Ask Your Question
0

having issue with source attribute

asked 2015-04-30 06:29:17 -0600

Chutki gravatar image

Hi,

I have following manifests

 file { '/opt/script/test_install.sh':
    ensure => present,
    owner  => 'root',
    group  => 'root',
    mode   => '0700',
    source => "puppet:///modules/modulename/${::env}/test_install.sh",
  }

I have two directory under /etc/puppetlabs/modules/modulename/files (prod and nonprod), so the manifests should take according to site.pp "$env" variable. if its non prod, then manifests need to take /etc/puppetlabs/modules/modulename/files/nonprod/testinstall.sh file. if its prod then /etc/puppetlabs/modules/modulename/files/prod/testinstall.sh

when I run getting below error

File[/opt/script/test_install.sh]: Could not evaluate: Could not retrieve file metadata for 
puppet:///modules/modulename/nonprod/test_install.sh: 
Error 400 on SERVER: Permission denied - /etc/puppetlabs/puppet/modules/modulename/files/nonprod/test_install.sh
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-04-30 09:26:11 -0600

csharpsteen gravatar image

Based on the "permission denied" error message, it seems the permissions on the following file may need to be adjusted:

/etc/puppetlabs/puppet/modules/modulename/files/nonprod/test_install.sh

The file should be readable by the pe-puppet user in order for the master to deliver the file to the agent.

edit flag offensive delete link more

Comments

yeah, problem with source file I changed the group and it worked.

Chutki gravatar imageChutki ( 2015-04-30 13:50:02 -0600 )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: 2015-04-30 06:29:17 -0600

Seen: 63 times

Last updated: Apr 30 '15