diff --git a/firewall/manifests/init.pp b/firewall/manifests/init.pp index 0f0ed9d..489e753 100644 --- a/firewall/manifests/init.pp +++ b/firewall/manifests/init.pp @@ -111,6 +111,13 @@ class firewall::common::iptables { } $ip6states = versioncmp($::kernelversion, "2.6.20") + if $::operatingsystem == "Fedora" and $::operatingsystemrelease > 17 { + package { "firewalld": + ensure => absent, + before => Package["iptables"], + } + } + package { "iptables": ensure => installed, name => $::operatingsystem ? { @@ -119,7 +126,8 @@ class firewall::common::iptables { "debian" => [ "iptables", "iptables-persistent" ], "fedora" => $::operatingsystemrelease ? { /^1[0-5]/ => [ "iptables", "iptables-ipv6" ], - default => "iptables", + /^1[6-7]/ => "iptables", + default => [ "iptables", "iptables-services" ], }, "ubuntu" => [ "iptables", "iptables-persistent" ], }, diff --git a/network/manifests/init.pp b/network/manifests/init.pp index f112715..d4af18f 100644 --- a/network/manifests/init.pp +++ b/network/manifests/init.pp @@ -73,7 +73,23 @@ class network::hostname { group => "root", } } - "centos","redhat","fedora": { + "fedora": { + if $::operatingsystemrelease > 17 { + file { "/etc/hostname": + ensure => present, + content => "${homename}\n", + mode => "0644", + owner => "root", + group => "root", + } + } else { + augeas { "set-hostname": + context => "/files/etc/sysconfig/network", + changes => "set HOSTNAME ${homename}", + } + } + } + "centos","redhat": { augeas { "set-hostname": context => "/files/etc/sysconfig/network", changes => "set HOSTNAME ${homename}", diff --git a/ssh/manifests/init.pp b/ssh/manifests/init.pp index 68cfab0..c47a78d 100644 --- a/ssh/manifests/init.pp +++ b/ssh/manifests/init.pp @@ -16,7 +16,10 @@ class ssh::known_hosts { ensure => present, type => rsa, key => $sshrsakey, - host_aliases => inline_template("<%= homename.split('.')[0] %>"), + host_aliases => [ + inline_template("<%= homename.split('.')[0] %>"), + $::ipaddress, + ], require => File["/etc/ssh/ssh_known_hosts"], } diff --git a/syslog/manifests/init.pp b/syslog/manifests/init.pp index 635c989..61c457d 100644 --- a/syslog/manifests/init.pp +++ b/syslog/manifests/init.pp @@ -175,16 +175,20 @@ class syslog::client::rsyslog { } service { "rsyslog": - ensure => running, - enable => true, - start => $::operatingsystem ? { + ensure => running, + enable => true, + start => $::operatingsystem ? { "openbsd" => $::operatingsystemrelease ? { /4\.[1-8]/ => "pkill syslogd; /usr/local/sbin/rsyslogd -c 4 -x -i /var/run/syslog.pid", default => undef, }, default => undef, }, - require => File["/var/log/all.log"], + hasrestart => $::operatingsystem ? { + "fedora" => true, + default => false, + }, + require => File["/var/log/all.log"], } if $::operatingsystem == "OpenBSD" and $::operatingsystemrelease !~ /4\.[1-8]/ {