Converted tabs to spaces from firewall and mythtv modules.
This commit is contained in:
parent
335b2e7735
commit
31b1277c8e
2 changed files with 84 additions and 84 deletions
|
@ -27,15 +27,15 @@ class firewall {
|
||||||
}
|
}
|
||||||
|
|
||||||
case $operatingsystem {
|
case $operatingsystem {
|
||||||
centos,debian,fedora,ubuntu: {
|
centos,debian,fedora,ubuntu: {
|
||||||
include firewall::iptables
|
include firewall::iptables
|
||||||
}
|
}
|
||||||
openbsd: {
|
openbsd: {
|
||||||
include firewall::pf
|
include firewall::pf
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
fail("Firewall module not supported in ${operatingsystem}")
|
fail("Firewall module not supported in ${operatingsystem}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -54,15 +54,15 @@ class firewall {
|
||||||
class firewall::custom {
|
class firewall::custom {
|
||||||
|
|
||||||
case $operatingsystem {
|
case $operatingsystem {
|
||||||
centos,debian,fedora,ubuntu: {
|
centos,debian,fedora,ubuntu: {
|
||||||
include firewall::custom::iptables
|
include firewall::custom::iptables
|
||||||
}
|
}
|
||||||
openbsd: {
|
openbsd: {
|
||||||
include firewall::custom::pf
|
include firewall::custom::pf
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
fail("Firewall module not supported in ${operatingsystem}")
|
fail("Firewall module not supported in ${operatingsystem}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -87,12 +87,12 @@ class firewall::common::iptables {
|
||||||
ubuntu => "/etc/iptables/rules",
|
ubuntu => "/etc/iptables/rules",
|
||||||
default => "/etc/sysconfig/iptables",
|
default => "/etc/sysconfig/iptables",
|
||||||
},
|
},
|
||||||
ensure => present,
|
ensure => present,
|
||||||
mode => 0600,
|
mode => 0600,
|
||||||
owner => root,
|
owner => root,
|
||||||
group => root,
|
group => root,
|
||||||
require => Package["iptables"],
|
require => Package["iptables"],
|
||||||
notify => Service["iptables"],
|
notify => Service["iptables"],
|
||||||
}
|
}
|
||||||
|
|
||||||
case $operatingsystem {
|
case $operatingsystem {
|
||||||
|
@ -122,16 +122,16 @@ class firewall::common::iptables {
|
||||||
ubuntu => "iptables-persistent",
|
ubuntu => "iptables-persistent",
|
||||||
default => "iptables",
|
default => "iptables",
|
||||||
},
|
},
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
enable => true,
|
||||||
hasrestart => $operatingsystem ? {
|
hasrestart => $operatingsystem ? {
|
||||||
centos => true,
|
centos => true,
|
||||||
debian => false,
|
debian => false,
|
||||||
fedora => true,
|
fedora => true,
|
||||||
ubuntu => false,
|
ubuntu => false,
|
||||||
},
|
},
|
||||||
status => "iptables -t filter --list --line-numbers | egrep '^1'",
|
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 {
|
class firewall::iptables inherits firewall::common::iptables {
|
||||||
|
|
||||||
File["/etc/sysconfig/iptables"] {
|
File["/etc/sysconfig/iptables"] {
|
||||||
content => template("firewall/iptables.erb"),
|
content => template("firewall/iptables.erb"),
|
||||||
}
|
}
|
||||||
|
|
||||||
case $operatingsystem {
|
case $operatingsystem {
|
||||||
|
@ -161,8 +161,8 @@ class firewall::iptables inherits firewall::common::iptables {
|
||||||
class firewall::custom::iptables inherits firewall::common::iptables {
|
class firewall::custom::iptables inherits firewall::common::iptables {
|
||||||
|
|
||||||
File["/etc/sysconfig/iptables"] {
|
File["/etc/sysconfig/iptables"] {
|
||||||
source => [ "puppet:///files/firewall/iptables.${fqdn}",
|
source => [ "puppet:///files/firewall/iptables.${fqdn}",
|
||||||
"puppet:///files/firewall/iptables", ],
|
"puppet:///files/firewall/iptables", ],
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -173,16 +173,16 @@ class firewall::custom::iptables inherits firewall::common::iptables {
|
||||||
class firewall::common::pf {
|
class firewall::common::pf {
|
||||||
|
|
||||||
file { "/etc/pf.conf":
|
file { "/etc/pf.conf":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
mode => 0600,
|
mode => 0600,
|
||||||
owner => root,
|
owner => root,
|
||||||
group => wheel,
|
group => wheel,
|
||||||
notify => Exec["pfctl -f /etc/pf.conf"],
|
notify => Exec["pfctl -f /etc/pf.conf"],
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "pfctl -f /etc/pf.conf":
|
exec { "pfctl -f /etc/pf.conf":
|
||||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,7 @@ class firewall::common::pf {
|
||||||
class firewall::pf inherits firewall::common::pf {
|
class firewall::pf inherits firewall::common::pf {
|
||||||
|
|
||||||
File["/etc/pf.conf"] {
|
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 {
|
class firewall::custom::pf inherits firewall::common::pf {
|
||||||
|
|
||||||
File["/etc/pf.conf"] {
|
File["/etc/pf.conf"] {
|
||||||
source => [ "puppet:///files/firewall/pf.conf.${fqdn}",
|
source => [ "puppet:///files/firewall/pf.conf.${fqdn}",
|
||||||
"puppet:///files/firewall/pf.conf", ],
|
"puppet:///files/firewall/pf.conf", ],
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
# Database name (defaults to mythconverg).
|
# Database name (defaults to mythconverg).
|
||||||
#
|
#
|
||||||
# $mythtv_dbuser:
|
# $mythtv_dbuser:
|
||||||
# Database user name (defaults to mythtv).
|
# Database user name (defaults to mythtv).
|
||||||
#
|
#
|
||||||
# $mythtv_dbpass:
|
# $mythtv_dbpass:
|
||||||
# Database password.
|
# Database password.
|
||||||
|
@ -18,13 +18,13 @@
|
||||||
class mythtv::backend {
|
class mythtv::backend {
|
||||||
|
|
||||||
if ! $mythtv_dbhost {
|
if ! $mythtv_dbhost {
|
||||||
$mythtv_dbhost = "localhost"
|
$mythtv_dbhost = "localhost"
|
||||||
}
|
}
|
||||||
if ! $mythtv_dbuser {
|
if ! $mythtv_dbuser {
|
||||||
$mythtv_dbuser = "mythtv"
|
$mythtv_dbuser = "mythtv"
|
||||||
}
|
}
|
||||||
if ! $mythtv_dbname {
|
if ! $mythtv_dbname {
|
||||||
$mythtv_dbname = "mythconverg"
|
$mythtv_dbname = "mythconverg"
|
||||||
}
|
}
|
||||||
|
|
||||||
include user::system
|
include user::system
|
||||||
|
@ -36,29 +36,29 @@ class mythtv::backend {
|
||||||
"mythtv-setup",
|
"mythtv-setup",
|
||||||
"mythtv-docs",
|
"mythtv-docs",
|
||||||
"perl-DBD-MySQL", ]:
|
"perl-DBD-MySQL", ]:
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
require => [ User["mythtv"],
|
require => [ User["mythtv"],
|
||||||
Group["mythtv"], ],
|
Group["mythtv"], ],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/mythtv/mysql.txt":
|
file { "/etc/mythtv/mysql.txt":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
content => template("mythtv/mysql.txt.erb"),
|
content => template("mythtv/mysql.txt.erb"),
|
||||||
mode => 0640,
|
mode => 0640,
|
||||||
owner => root,
|
owner => root,
|
||||||
group => mythtv,
|
group => mythtv,
|
||||||
notify => Service["mythbackend"],
|
notify => Service["mythbackend"],
|
||||||
require => Package["mythtv-backend"],
|
require => Package["mythtv-backend"],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/mythtv/config.xml":
|
file { "/etc/mythtv/config.xml":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
content => template("mythtv/config.xml.erb"),
|
content => template("mythtv/config.xml.erb"),
|
||||||
mode => 0640,
|
mode => 0640,
|
||||||
owner => root,
|
owner => root,
|
||||||
group => mythtv,
|
group => mythtv,
|
||||||
notify => Service["mythbackend"],
|
notify => Service["mythbackend"],
|
||||||
require => Package["mythtv-backend"],
|
require => Package["mythtv-backend"],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/sysconfig/mythbackend":
|
file { "/etc/sysconfig/mythbackend":
|
||||||
|
@ -72,16 +72,16 @@ class mythtv::backend {
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/root/.mythtv":
|
file { "/root/.mythtv":
|
||||||
ensure => "/etc/mythtv",
|
ensure => "/etc/mythtv",
|
||||||
force => true,
|
force => true,
|
||||||
require => Package["mythtv-backend"],
|
require => Package["mythtv-backend"],
|
||||||
}
|
}
|
||||||
|
|
||||||
service { "mythbackend":
|
service { "mythbackend":
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
enable => true,
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
require => Package["mythtv-backend"],
|
require => Package["mythtv-backend"],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/cron.daily/mythorphans":
|
file { "/etc/cron.daily/mythorphans":
|
||||||
|
@ -102,23 +102,23 @@ class mythtv::backend {
|
||||||
class mythtv::cron inherits mythtv::backend {
|
class mythtv::cron inherits mythtv::backend {
|
||||||
|
|
||||||
package { [ "perl-MythTV", "perl-Net-UPnP" ]:
|
package { [ "perl-MythTV", "perl-Net-UPnP" ]:
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/cron.daily/mythfilldatabase":
|
file { "/etc/cron.daily/mythfilldatabase":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
source => "puppet:///mythtv/mythfilldatabase",
|
source => "puppet:///mythtv/mythfilldatabase",
|
||||||
mode => 0755,
|
mode => 0755,
|
||||||
owner => root,
|
owner => root,
|
||||||
group => root,
|
group => root,
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/cron.daily/mythoptimize":
|
file { "/etc/cron.daily/mythoptimize":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
source => "puppet:///mythtv/mythoptimize",
|
source => "puppet:///mythtv/mythoptimize",
|
||||||
mode => 0755,
|
mode => 0755,
|
||||||
owner => root,
|
owner => root,
|
||||||
group => root,
|
group => root,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ class mythtv::cron inherits mythtv::backend {
|
||||||
class mythtv::mythweb {
|
class mythtv::mythweb {
|
||||||
|
|
||||||
package { [ "mythweb", "mythweather" ]:
|
package { [ "mythweb", "mythweather" ]:
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
}
|
}
|
||||||
|
|
||||||
apache::configfile { "mythweb.conf":
|
apache::configfile { "mythweb.conf":
|
||||||
|
@ -153,12 +153,12 @@ class mythtv::mythweb {
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/usr/share/mythweb/data":
|
file { "/usr/share/mythweb/data":
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
mode => 0770,
|
mode => 0770,
|
||||||
owner => root,
|
owner => root,
|
||||||
group => httpsd,
|
group => httpsd,
|
||||||
seltype => "httpd_sys_rw_content_t",
|
seltype => "httpd_sys_rw_content_t",
|
||||||
require => Package["mythweb"],
|
require => Package["mythweb"],
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue