From d030bd2d78dedc1dca32c5b34f60010a9fd236a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Thu, 17 Jan 2013 11:16:15 +0200 Subject: [PATCH 1/4] Fixed network::hostname for Fedora 18. --- network/manifests/init.pp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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}", From b5a9073efbff7c1e05eb2cbe425dcc41cc271f6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Thu, 17 Jan 2013 11:17:51 +0200 Subject: [PATCH 2/4] Fixed firewall module for Fedora 18. --- firewall/manifests/init.pp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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" ], }, From 0019d10f1feea9e911c714acbe3948cf0d248224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Thu, 17 Jan 2013 11:47:04 +0200 Subject: [PATCH 3/4] Fixed rsyslog restart for Fedora 18. Service cannot be stopped with systemctl or service command anymore. --- syslog/manifests/init.pp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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]/ { From 57443597cab736db1596208ed829d83589808d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Thu, 17 Jan 2013 14:57:45 +0200 Subject: [PATCH 4/4] Added ipaddress to host_aliases in ssh::known_hosts. --- ssh/manifests/init.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"], }