hOOlä'gOO khän
2009-Feb-27 03:00 UTC
[Puppet Users] management of files in a directory i already deployed in same class
here''s most of my class, if I comment out the bottom 3 clauses , the 3
key files get copied. otherwise it doesn''t get copied. what am i
doing wrong ?
class openvpn {
file {"/etc/openvpn/keys":
ensure => exists ,
ensure => present ,
ensure => directory ,
recurse => true ,
purge => true,
force => true,
owner => "root",
group => "root",
#mode => 755 ,
source => "puppet://puppet/files/colo/openvpn/keys"
,
ignore => ".svn" ,
}
file {"/etc/openvpn/keys/ca.key":
mode => 600 ,
}
file {"/etc/openvpn/keys/server.key":
mode => 600 ,
}
file {"/etc/openvpn/keys/ta.key":
mode => 600 ,
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Bjørn Dyresen
2009-Feb-27 07:40 UTC
[Puppet Users] Re: management of files in a directory i already deployed in same class
On Feb 27, 2009, at 4:00 AM, hOOlä''gOO khän wrote:> > here''s most of my class, if I comment out the bottom 3 clauses , the 3 > key files get copied. otherwise it doesn''t get copied. what am i > doing wrong ? > > class openvpn { > file {"/etc/openvpn/keys": > ensure => exists , > ensure => present , > ensure => directory , > recurse => true , > purge => true, > force => true, > owner => "root", > group => "root", > #mode => 755 , > source => "puppet://puppet/files/colo/openvpn/keys" , > ignore => ".svn" , > } > > file {"/etc/openvpn/keys/ca.key": > mode => 600 , > } > > file {"/etc/openvpn/keys/server.key": > mode => 600 , > } > > file {"/etc/openvpn/keys/ta.key": > mode => 600 , > } > } > >Try with: require => File[''etc/openvpn/keys''] In your last three file statements. Puppet does care about ordering unless you tell it to. You can''t copy files into a directory that does not exists. And regarding when you are creating a directory, I would skip ensure => present Just stick to ensure => directory. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Bjørn Dyre Dyresen
2009-Feb-27 07:47 UTC
[Puppet Users] Re: management of files in a directory i already deployed in same class
2009/2/27 Bjørn Dyresen <bjorn@dyresen.net>> > On Feb 27, 2009, at 4:00 AM, hOOlä''gOO khän wrote: > > >> here''s most of my class, if I comment out the bottom 3 clauses , the 3 >> key files get copied. otherwise it doesn''t get copied. what am i >> doing wrong ? >> >> class openvpn { >> file {"/etc/openvpn/keys": >> ensure => exists , >> ensure => present , >> ensure => directory , >> recurse => true , >> purge => true, >> force => true, >> owner => "root", >> group => "root", >> #mode => 755 , >> source => "puppet://puppet/files/colo/openvpn/keys" , >> ignore => ".svn" , >> } >> >> file {"/etc/openvpn/keys/ca.key": >> mode => 600 , >> } >> >> file {"/etc/openvpn/keys/server.key": >> mode => 600 , >> } >> >> file {"/etc/openvpn/keys/ta.key": >> mode => 600 , >> } >> } >> >> >> > > > Try with: > > require => File[''etc/openvpn/keys''] > > In your last three file statements. Puppet does care about ordering unless > you tell it to. You can''t copy files into a directory that does not exists. > > And regarding when you are creating a directory, I would skip ensure => > present Just stick to ensure => directory. > > > >It should of course be, does not care.... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Peter Meier
2009-Feb-27 08:30 UTC
[Puppet Users] Re: management of files in a directory i already deployed in same class
Hi>> Try with: >> >> require => File[''etc/openvpn/keys''] >> >> In your last three file statements. Puppet does care about ordering unless >> you tell it to. You can''t copy files into a directory that does not exists. >> >> And regarding when you are creating a directory, I would skip ensure => >> present Just stick to ensure => directory. >> > It should of course be, does not care....puppet does automagically care of the order of files in the same path. so: file{''/tmp/a'': ensure => present, } file{''/tmp/a/b'': ensure => present, } works always. the question is more: what means "it doesn''t get copied" ? What''s the error that appears, can you run it with --debug, which version are you using etc.? cheers pete --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---