Hello, i use a file type to manage sysctl.conf. For some work i override this file by doign File[''/etc/sysctl.conf''] and i have an exec refresh only to run sysctl -p so it reread the sysctl.conf file if changed. My issue is that at each run i got, i start in state when i see the overriden one on the server: 1st run, i have the basic sysctl.conf not the ovveriden one 2nd run i got the overriden one 3rd run i got the basic one and so on.. the sysctl.conf is on my linux classe, my debian class inherit linux, my ehdebian class inherits debian and override the debian classe /etc/sysctl.conf file. a i doing something wrong ? class ehdebain inherits debian { File[''/etc/sysctl.conf''] { content => template("/var/puppet/templates/sysctl2.conf"), backup => false } } class debian inherits linux { } class linux { file { ''/etc/sysctl.conf'': source => "puppet://$puppetserver/system/sysctl.conf", ensure => file, mode => ''600'', owner => root } exec { ''sysctlp'': command => ''sysctl -p'', refreshonly => true, subscribe => File[''/etc/sysctl.conf''] } } i use puppetversion => 0.22.0 on client & server -- Cordialement, Ghislain _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Hi, I''m not sure mixing "source" and "content" on a file declaration is a right thing. I think Puppet cant decide if it use either the "source" or the "content" so i guess it uses both. So at each run Puppet updates you file, once with the "source" datas, the other time with the "content" datas. You should try using a template in your linux class even it is a "fake" template. 2007/1/25, ADNET Ghislain <gadnet@aqueos.com>:> Hello, > > > i use a file type to manage sysctl.conf. For some work i override this file by doign File[''/etc/sysctl.conf''] and i > have an exec refresh only to run sysctl -p so it reread the sysctl.conf file if changed. > > My issue is that at each run i got, i start in state when i see the overriden one on the server: > > 1st run, i have the basic sysctl.conf not the ovveriden one > 2nd run i got the overriden one > 3rd run i got the basic one > > and so on.. > > the sysctl.conf is on my linux classe, my debian class inherit linux, my ehdebian class inherits debian and override > the debian classe /etc/sysctl.conf file. a i doing something wrong ? > > > class ehdebain inherits debian { > File[''/etc/sysctl.conf''] { > content => template("/var/puppet/templates/sysctl2.conf"), > backup => false > } > } > > class debian inherits linux { > } > > class linux { > > file { ''/etc/sysctl.conf'': > source => "puppet://$puppetserver/system/sysctl.conf", > ensure => file, > mode => ''600'', > owner => root > } > > exec { ''sysctlp'': > command => ''sysctl -p'', > refreshonly => true, > subscribe => File[''/etc/sysctl.conf''] > } > > } > > > i use puppetversion => 0.22.0 on client & server > > > -- > Cordialement, > Ghislain > > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users > > > >
Sébastien Prud''homme a écrit :> Hi, > > I''m not sure mixing "source" and "content" on a file declaration is a > right thing. > > I think Puppet cant decide if it use either the "source" or the > "content" so i guess it uses both. So at each run Puppet updates you > file, once with the "source" datas, the other time with the "content" > datas. > > You should try using a template in your linux class even it is a > "fake" template. >you got it , merci sébastien , i was not even seeing that i used 2 different techniques to fill the file. seems to me that puppet could warn when the file have both a content AND a source attached to it, perhaps the code do not catch the overrided conflict :) Luke do you feel too that this is a bug , i can fill one in the ticket system if you think so. -- Cordialement, Ghislain _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Jan 25, 2007, at 10:14 AM, ADNET Ghislain wrote:> > you got it , > > merci sébastien , > > i was not even seeing that i used 2 different techniques to fill > the file. seems to me that puppet could warn when the file have > both a content AND a source attached to it, perhaps the code do not > catch the overrided conflict :) Luke do you feel too that this is > a bug , i can fill one in the ticket system if you think so.Yes, please file it as a bug. -- I don''t know the key to success, but the key to failure is trying to please everybody. -- Bill Cosby --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com