Ask Your Question
0

Could not retrieve information from source(s) puppet:///modules/sudoers

asked 2014-08-07 00:31:48 -0500

jeff gravatar image

updated 2014-08-08 16:28:51 -0500

spuder gravatar image

Hi,

I am trying to copy my sudoers file from puppet server to client. But, when I roll out, I am getting the error as,

info: Caching catalog for server3.openhostsupport.com
info: Applying configuration version '1407388436'
err: /Stage[main]//File[/etc/sudoers]: Could not evaluate: Could not retrieve information from source(s) puppet:///modules/sudoers at /etc/puppet/manifests/site.pp:6
notice: Finished catalog run in 0.08 seconds

My manifests file is,

file { "/etc/sudoers":

  owner => 'root',
  group => 'root',
  mode => '0440',
  source => "puppet:///modules/sudoers"
}

and the master’s file server details are,

[root@puppetmaster modules]# pwd
/etc/puppet/modules

[root@puppetmaster modules]# ls
sudoers

[root@puppetmaster modules]# pwd
/usr/share/puppet/modules

[root@puppetmaster modules]# ls
sudoers

NB: Puppet module path is default,

[root@puppetmaster modules]#  puppet config print modulepath --section master --environment test
/etc/puppet/modules:/usr/share/puppet/modules

Puppet master version - 3.6.2

Puppet client version - 2.6.12

Also, puppet.conf file of the client is,

cat /etc/puppet/puppet.conf 

[main]
    logdir = /var/log/puppet
    rundir = /var/run/puppet
    server = server4.openhostsupport.com
     user = puppet
     group = puppet
     ssldir = $vardir/ssl

[agent]
    classfile = $vardir/classes.txt
    localconfig = $vardir/localconfig

Please let me know if any more details are required. Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2014-08-08 15:48:02 -0500

lavaman gravatar image

As you can see in the type reference you must specify the path to the file inside your module. If it is in sudoers/files/etc/sudoers, your source should be:

puppet:///modules/sudoers/etc/sudoers

Since you do not have to put your files in your module under the same path you deploy them to, you must always specify the full path to the file inside your module.

edit flag offensive delete link more

Comments

Lavaman, Cool. That worked smoothy. I have added "files" folder inbetween. Now the manifests and file location is as, source => "puppet:///modules/sudoers/etc/sudoers" # ls -l /etc/puppet/modules/sudoers/files/etc/sudoers -rw-r--r-- 1 root root 0 Aug 9 00:18 /etc/puppet/modules/sudoers/files/etc/sudo ers ls -l /usr/share/puppet/modules/sudoers/files/etc/sudoe rs -rw-r--r-- 1 root root 0 Aug 9 00:18 /usr/share/puppet/modules/sudoers/files/et c/sudoers

jeff gravatar imagejeff ( 2014-08-08 23:19:50 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-08-07 00:31:48 -0500

Seen: 693 times

Last updated: Aug 08 '14