Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do I define the directory in init.pp?

My init.pp looks like below:

class checkout {
 file { '/etc/example/test/testcv.sh':
 ensure   => present,
    owner => 'root',
    mode => '0755',
    content => template('checkout/testcv.sh.erb')
    }
}

What this does is, copies testcv.sh to my /etc/example/test/ in all my hosts automatically. But if I have to copy the directory to the certain location what resource type should I use? I tried replacing file with "dir" but it didn't work.