On 08.12.2009 15:00, Silviu Paragina wrote: > On 08.12.2009 12:17, David Schmitt wrote: >> On 07.12.2009 21:01, Silviu Paragina wrote: >> >>> I forgot to add, I need some resources applied in this case so fail >>> won't be enough because it fails before applying any resources. >>> >>> example: in the case where lsb-release isn't installed on a >>> $operatingsystem == "Debian" system I would like to install lsb-realease >>> and then fail or restart just to be sure I'm not actually on a Ubuntu system >>> >>> Another example would be augeas, where, even if in a run augeas would be >>> installed, puppet would fail because of missing augeas provider. >>> >> Put all clients which do not have lsb-release and/or augeas installed >> into a separate bootstrap mode. You can use environments and/or tags to >> implement this. >> >> In this special mode just install the tools you need. The next run will >> resume with the full information available. >> >> Normally this "special" bootstrap run is already done from the installer >> to make this very easy, e.g. in debian-installer's postcmd: >> >> puppetd --environment bootstrap-debian --onetime --no-daemonize >> >> >> Regards, DavidS >> > Can this be automated, if somebody uninstalls lsb-release by mistake for > example? aptitude has a bad habit of doing this... > And can it be done from a manifest the standard puppet way? > One possible way I can think of this is to run puppet (not puppetd) with > an exec, but I'm not sure about the locks puppet uses (if the locks are > different from puppetd):-?
If you can detect from the facts that an erreneous situation is ocurring, you could change the environment at the node level or in an external node script. Regards, DavidS -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.