diff --git a/autofs/manifests/init.pp b/autofs/manifests/init.pp index 0af45c0..21404c8 100644 --- a/autofs/manifests/init.pp +++ b/autofs/manifests/init.pp @@ -14,9 +14,11 @@ class autofs { file { "/etc/auto.master": ensure => present, - source => [ "puppet:///files/autofs/auto.master.${fqdn}", - "puppet:///files/autofs/auto.master", - "puppet:///modules/autofs/auto.master", ], + source => [ + "puppet:///files/autofs/auto.master.${::homename}", + "puppet:///files/autofs/auto.master", + "puppet:///modules/autofs/auto.master", + ], mode => "0644", owner => "root", group => "root", diff --git a/avahi/manifests/init.pp b/avahi/manifests/init.pp index 1951dbe..fdbe91c 100644 --- a/avahi/manifests/init.pp +++ b/avahi/manifests/init.pp @@ -7,7 +7,7 @@ class avahi::daemon { ensure => installed, } - if $operatingsystem == "OpenBSD" { + if $::operatingsystem == "OpenBSD" { service { "dbus-daemon": ensure => running, enable => true, @@ -20,9 +20,9 @@ class avahi::daemon { ensure => running, enable => true, status => "avahi-daemon -c", - start => $operatingsystem ? { - openbsd => "avahi-daemon -D", - default => undef, + start => $::operatingsystem ? { + "openbsd" => "avahi-daemon -D", + default => undef, }, require => Package["avahi"], } @@ -34,10 +34,10 @@ class avahi::daemon { recurse => true, source => "puppet:///modules/custom/empty", mode => "0755", - owner => root, - group => $operatingsystem ? { - openbsd => wheel, - default => root, + owner => "root", + group => $::operatingsystem ? { + "openbsd" => "wheel", + default => "root", }, require => Package["avahi"], } @@ -96,9 +96,9 @@ define avahi::service($port = "AUTO", $description = "%h", $ensure = "present", content => template("avahi/service.erb"), mode => "0644", owner => root, - group => $operatingsystem ? { - openbsd => wheel, - default => root, + group => $::operatingsystem ? { + "openbsd" => "wheel", + default => "root", }, notify => Service["avahi-daemon"], } @@ -107,8 +107,12 @@ define avahi::service($port = "AUTO", $description = "%h", $ensure = "present", # Install avahi client support. # -class avahi::client inherits avahi::daemon { +class avahi::client { + + require avahi::daemon + package { "avahi-tools": ensure => installed, } + } diff --git a/gcc/manifests/init.pp b/gcc/manifests/init.pp index fb5c8c0..32b558d 100644 --- a/gcc/manifests/init.pp +++ b/gcc/manifests/init.pp @@ -10,9 +10,9 @@ class gcc { ensure => installed, } - if $kernel == Linux { + if $::kernel == Linux { package { "kernel-headers": - name => $operatingsystem ? { + name => $::operatingsystem ? { "debian" => "linux-kernel-headers", "ubuntu" => "linux-kernel-headers", default => [ "kernel-headers", "kernel-devel", ], diff --git a/inetd/manifests/init.pp b/inetd/manifests/init.pp index c7a0f7e..4161770 100644 --- a/inetd/manifests/init.pp +++ b/inetd/manifests/init.pp @@ -5,15 +5,15 @@ # class inetd::server { - case $operatingsystem { - centos,fedora,ubuntu,debian: { + case $::operatingsystem { + "centos","fedora","ubuntu","debian": { include inetd::server::xinetd } - openbsd: { + "openbsd": { include inetd::server::inetd } default: { - fail("Inetd module not supported in ${operatingsystem}") + fail("Inetd module not supported in ${::operatingsystem}") } } @@ -76,8 +76,8 @@ define inetd::service($ensure = present) { include inetd::server - case $operatingsystem { - centos,ubuntu,debian: { + case $::operatingsystem { + "centos","ubuntu","debian": { service { $name: enable => $ensure ? { present => true, @@ -86,7 +86,7 @@ define inetd::service($ensure = present) { notify => Service["xinetd"], } } - fedora: { + "fedora": { augeas { "config-inetd-${name}": context => "/files/etc/xinetd.d/${name}/service", changes => $ensure ? { @@ -96,7 +96,7 @@ define inetd::service($ensure = present) { notify => Service["xinetd"], } } - openbsd: { + "openbsd": { exec { "enable-inetd-${name}": command => $ensure ? { "present" => "ruby -pi -e 'sub(/^#${name}(\\s+)/, \"${name}\\\\1\")' /etc/inetd.conf", @@ -111,7 +111,7 @@ define inetd::service($ensure = present) { } } default: { - fail("Inetd module not supported in ${operatingsystem}") + fail("Inetd module not supported in ${::operatingsystem}") } } diff --git a/netcat/manifests/init.pp b/netcat/manifests/init.pp index 409f32f..a490272 100644 --- a/netcat/manifests/init.pp +++ b/netcat/manifests/init.pp @@ -3,9 +3,9 @@ # class netcat { - if $operatingsystem != "OpenBSD" { + if $::operatingsystem != "OpenBSD" { package { "netcat": - name => $operatingsystem ? { + name => $::operatingsystem ? { "ubuntu" => "netcat", default => "nc", },