Sans wrote :
> As said in the subject line, is there a "nice" way of creating
> directory tree if parent is not already there, like using "mkdir -p"?
This will do exactly what you want :
$cert_dir = 'globus/cert'
exec { 'mkdir_cert_dir':
path => [ '/bin', '/usr/bin' ],
command => "mkdir -p /opt/${cert_dir}",
unless => "test -d /opt/${cert_dir}",
}
file { "/opt/${cert_dir}/${::hostname}-cert.pem":
mode => '0444', owner => 'root', group => 'root',
source => "puppet:///modules/p_nodes/${::hostname}-cert.pem";
require => Exec['mkdir_cert_dir'],
}
HTH :-)
Matthias
--
Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
Fedora release 14 (Laughlin) - Linux kernel 2.6.35.13-91.fc14.x86_64
Load : 0.01 0.04 0.13
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.