Skip to content

Instantly share code, notes, and snippets.

@limed
Last active October 9, 2015 06:38
Show Gist options
  • Select an option

  • Save limed/3455733 to your computer and use it in GitHub Desktop.

Select an option

Save limed/3455733 to your computer and use it in GitHub Desktop.
Puppet base module for enteprise linux
class base::el {
# This is the enteprise linux class, we will split it off more
# for centos or redhat
if $::osfamily != redhat {
fail("${::operatingsystem} not supported")
}
class { 'yum':
extrarepo => ['epel', 'puppetlabs'],
}
package {
'htop':
ensure => present,
require => Class['yum'];
}
case $::operatingsystemrelease {
/^5/: {
yum::remove {
'smartmontools': ensure => absent;
}
}
default: { }
}
service {
'cups':
ensure => stopped,
enable => false;
'iptables':
ensure => stopped,
enable => false;
'iscsid':
ensure => stopped,
enable => false;
'pcscd':
ensure => stopped,
enable => false;
}
case $::operatingsystem {
centos: {
include base::centos
}
redhat: {
include base::redhat
}
default: { }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment