About | FAQ | Help
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

having issue with source attribute


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/test_install.sh file. if its prod then /etc/puppetlabs/modules/modulename/files/prod/test_install.sh

when I run getting below error

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