We've been pretty much a homogenous CentOS environment until recently.
Actually, we've had a mixture of CentOS, Ubuntu and Debian because a
previous admin thought this would be 'fun'. Grrrr. Anyway, I tried to
add an Ubuntu system for the first time. My site.pp file has a 'yum
clean all' dependency that gets run before any package is installed to
make sure it always gets the latest copy of what's available on the
repo. I don't want/need this to run for Ubuntu systems.

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?

Package {
    provider => $operatingsystem ? {
        debian => aptitude,
        redhat => yum,
        centos => yum,
        ubuntu => apt,
    },
}

exec {
    "yum-clean-all":
        command => "/usr/bin/yum clean all";
}

-- 
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.

Reply via email to