Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

source parameter not working #41

Closed
StFS opened this issue Apr 25, 2013 · 2 comments
Closed

source parameter not working #41

StFS opened this issue Apr 25, 2013 · 2 comments

Comments

@StFS
Copy link

StFS commented Apr 25, 2013

Hi.

I'm very new to Puppet and the example42 modules and I'm trying to get things to work but I'm having some issues.

I have a site.pp file (see below) which defines the source parameter for the puppet class but when I run this I get an error stating "Error: Failed to apply catalog: You cannot specify more than one of content, source, target"

After asking for help I added the template => '' parameter and I've also tried template => undef but both of these have no effect.

As you can see I have also been trying to get source_dir to work but that has its own problems which I'll report in a separate bug. However, it may be of interest that specifying source_dir alone does not work but adding the template => undef does work to some extent in that case.

My site.pp file:

class base_nopuppet {
  include openssh
  class { 'sudo':
    source => [ "puppet:///modules/data/sudo/sudo.conf-${hostname}" , "puppet:///modules/data/sudo/sudo.conf" ],
  }
  class { 'mailx':
    source => [ "puppet:///modules/data/mailx/mailx.conf-${hostname}" , "puppet:///modules/data/mailx/mailx.conf" ],
  }
}

class base {
  include base_nopuppet
  class { 'puppet':
    source => "puppet:///modules/data/puppet/puppet.conf",
    #source_dir => 'puppet:///modules/data/puppet/conf/',
    #source_dir_purge => false,
    template => '',
  }
}

node default {
  include base
}

node 'puppet.cs.ru.is' {
  include base_nopuppet

  class { 'puppet':
    mode => 'server',
    source => "puppet:///modules/data/puppet/puppet.conf",
    #source_dir => 'puppet:///modules/data/puppet/puppet.conf',
    #source_dir_purge => false,                                               
    template => '',                                                          
  }
}
alvagante added a commit that referenced this issue Apr 25, 2013
@alvagante
Copy link
Member

Thanks for the report, actually the Puppet module was a "special" case in the template management.
45c8e34 allows you to (really) disable the template usage with the parameter:

template => absent,   

@StFS
Copy link
Author

StFS commented Apr 25, 2013

Wow... talk about a quick response :)

Things are now working with the source parameter. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants