On Mon, Apr 26, 2010 at 8:58 AM, Julian Simpson <simpsonjul...@gmail.com> wrote: > >> I wasn't able to get this to run for only CentOS. I tried a few >> different things in the site.pp. I wish I could put a case statement >> inside the exec, but puppet doesn't like that. So, below is what I had >> originally... how can I get the exec["yum-clean-all"] to only run for >> CentOS and not Ubuntu? >> > > I make different classes. So the yum command would be in a class called > foo::centos. I might have an exec{ "aptitude update"} in a class called > foo::ubuntu, and a line in the class foo that went something like: include > foo::$operatingsystem. Might even be able to scratch up an example.
Well that seems ugly. So, every single module needs to include another module just so that it can call exec["yum-clean-all"] ? Just having the include doesn't guarantee that the exec will be called first, so how do you do that? Doug. -- 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.