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/':
    ensure => present,
    owner  => 'root',
    group  => 'root',
    mode   => '0700',
    source => "puppet:///modules/modulename/${::env}/",

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

when I run getting below error

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