diff --git a/firewall/manifests/init.pp b/firewall/manifests/init.pp index e947499..27452e0 100644 --- a/firewall/manifests/init.pp +++ b/firewall/manifests/init.pp @@ -27,15 +27,15 @@ class firewall { } case $operatingsystem { - centos,debian,fedora,ubuntu: { - include firewall::iptables - } - openbsd: { - include firewall::pf - } - default: { - fail("Firewall module not supported in ${operatingsystem}") - } + centos,debian,fedora,ubuntu: { + include firewall::iptables + } + openbsd: { + include firewall::pf + } + default: { + fail("Firewall module not supported in ${operatingsystem}") + } } } @@ -54,15 +54,15 @@ class firewall { class firewall::custom { case $operatingsystem { - centos,debian,fedora,ubuntu: { - include firewall::custom::iptables - } - openbsd: { - include firewall::custom::pf - } - default: { - fail("Firewall module not supported in ${operatingsystem}") - } + centos,debian,fedora,ubuntu: { + include firewall::custom::iptables + } + openbsd: { + include firewall::custom::pf + } + default: { + fail("Firewall module not supported in ${operatingsystem}") + } } } @@ -87,12 +87,12 @@ class firewall::common::iptables { ubuntu => "/etc/iptables/rules", default => "/etc/sysconfig/iptables", }, - ensure => present, - mode => 0600, - owner => root, - group => root, - require => Package["iptables"], - notify => Service["iptables"], + ensure => present, + mode => 0600, + owner => root, + group => root, + require => Package["iptables"], + notify => Service["iptables"], } case $operatingsystem { @@ -122,16 +122,16 @@ class firewall::common::iptables { ubuntu => "iptables-persistent", default => "iptables", }, - ensure => running, - enable => true, - hasrestart => $operatingsystem ? { + ensure => running, + enable => true, + hasrestart => $operatingsystem ? { centos => true, debian => false, fedora => true, ubuntu => false, }, status => "iptables -t filter --list --line-numbers | egrep '^1'", - require => Package["iptables"], + require => Package["iptables"], } } @@ -142,7 +142,7 @@ class firewall::common::iptables { class firewall::iptables inherits firewall::common::iptables { File["/etc/sysconfig/iptables"] { - content => template("firewall/iptables.erb"), + content => template("firewall/iptables.erb"), } case $operatingsystem { @@ -161,8 +161,8 @@ class firewall::iptables inherits firewall::common::iptables { class firewall::custom::iptables inherits firewall::common::iptables { File["/etc/sysconfig/iptables"] { - source => [ "puppet:///files/firewall/iptables.${fqdn}", - "puppet:///files/firewall/iptables", ], + source => [ "puppet:///files/firewall/iptables.${fqdn}", + "puppet:///files/firewall/iptables", ], } } @@ -173,16 +173,16 @@ class firewall::custom::iptables inherits firewall::common::iptables { class firewall::common::pf { file { "/etc/pf.conf": - ensure => present, - mode => 0600, - owner => root, - group => wheel, - notify => Exec["pfctl -f /etc/pf.conf"], + ensure => present, + mode => 0600, + owner => root, + group => wheel, + notify => Exec["pfctl -f /etc/pf.conf"], } exec { "pfctl -f /etc/pf.conf": - path => "/bin:/usr/bin:/sbin:/usr/sbin", - refreshonly => true, + path => "/bin:/usr/bin:/sbin:/usr/sbin", + refreshonly => true, } } @@ -193,7 +193,7 @@ class firewall::common::pf { class firewall::pf inherits firewall::common::pf { File["/etc/pf.conf"] { - content => template("firewall/pf.conf.erb"), + content => template("firewall/pf.conf.erb"), } } @@ -204,8 +204,8 @@ class firewall::pf inherits firewall::common::pf { class firewall::custom::pf inherits firewall::common::pf { File["/etc/pf.conf"] { - source => [ "puppet:///files/firewall/pf.conf.${fqdn}", - "puppet:///files/firewall/pf.conf", ], + source => [ "puppet:///files/firewall/pf.conf.${fqdn}", + "puppet:///files/firewall/pf.conf", ], } } diff --git a/mythtv/manifests/init.pp b/mythtv/manifests/init.pp index 5970fe2..a3a9a2b 100644 --- a/mythtv/manifests/init.pp +++ b/mythtv/manifests/init.pp @@ -10,7 +10,7 @@ # Database name (defaults to mythconverg). # # $mythtv_dbuser: -# Database user name (defaults to mythtv). +# Database user name (defaults to mythtv). # # $mythtv_dbpass: # Database password. @@ -18,13 +18,13 @@ class mythtv::backend { if ! $mythtv_dbhost { - $mythtv_dbhost = "localhost" + $mythtv_dbhost = "localhost" } if ! $mythtv_dbuser { - $mythtv_dbuser = "mythtv" + $mythtv_dbuser = "mythtv" } if ! $mythtv_dbname { - $mythtv_dbname = "mythconverg" + $mythtv_dbname = "mythconverg" } include user::system @@ -36,29 +36,29 @@ class mythtv::backend { "mythtv-setup", "mythtv-docs", "perl-DBD-MySQL", ]: - ensure => installed, + ensure => installed, require => [ User["mythtv"], Group["mythtv"], ], } file { "/etc/mythtv/mysql.txt": - ensure => present, - content => template("mythtv/mysql.txt.erb"), - mode => 0640, - owner => root, - group => mythtv, - notify => Service["mythbackend"], - require => Package["mythtv-backend"], + ensure => present, + content => template("mythtv/mysql.txt.erb"), + mode => 0640, + owner => root, + group => mythtv, + notify => Service["mythbackend"], + require => Package["mythtv-backend"], } file { "/etc/mythtv/config.xml": - ensure => present, - content => template("mythtv/config.xml.erb"), - mode => 0640, - owner => root, - group => mythtv, - notify => Service["mythbackend"], - require => Package["mythtv-backend"], + ensure => present, + content => template("mythtv/config.xml.erb"), + mode => 0640, + owner => root, + group => mythtv, + notify => Service["mythbackend"], + require => Package["mythtv-backend"], } file { "/etc/sysconfig/mythbackend": @@ -72,16 +72,16 @@ class mythtv::backend { } file { "/root/.mythtv": - ensure => "/etc/mythtv", - force => true, - require => Package["mythtv-backend"], + ensure => "/etc/mythtv", + force => true, + require => Package["mythtv-backend"], } service { "mythbackend": - ensure => running, - enable => true, - hasstatus => true, - require => Package["mythtv-backend"], + ensure => running, + enable => true, + hasstatus => true, + require => Package["mythtv-backend"], } file { "/etc/cron.daily/mythorphans": @@ -102,23 +102,23 @@ class mythtv::backend { class mythtv::cron inherits mythtv::backend { package { [ "perl-MythTV", "perl-Net-UPnP" ]: - ensure => installed, + ensure => installed, } file { "/etc/cron.daily/mythfilldatabase": - ensure => present, - source => "puppet:///mythtv/mythfilldatabase", - mode => 0755, - owner => root, - group => root, + ensure => present, + source => "puppet:///mythtv/mythfilldatabase", + mode => 0755, + owner => root, + group => root, } file { "/etc/cron.daily/mythoptimize": - ensure => present, - source => "puppet:///mythtv/mythoptimize", - mode => 0755, - owner => root, - group => root, + ensure => present, + source => "puppet:///mythtv/mythoptimize", + mode => 0755, + owner => root, + group => root, } } @@ -129,7 +129,7 @@ class mythtv::cron inherits mythtv::backend { class mythtv::mythweb { package { [ "mythweb", "mythweather" ]: - ensure => installed, + ensure => installed, } apache::configfile { "mythweb.conf": @@ -153,12 +153,12 @@ class mythtv::mythweb { } file { "/usr/share/mythweb/data": - ensure => directory, - mode => 0770, - owner => root, - group => httpsd, + ensure => directory, + mode => 0770, + owner => root, + group => httpsd, seltype => "httpd_sys_rw_content_t", - require => Package["mythweb"], + require => Package["mythweb"], } }