From ebde843cc66dc86d9f109530f41b19793d89a3f3 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Sat, 3 Aug 2013 00:06:03 +0300 Subject: [PATCH] Changed remaining fqdn references to homename --- apache/manifests/init.pp | 8 ++++---- cups/manifests/init.pp | 2 +- dhcp/manifests/init.pp | 2 +- dns/manifests/init.pp | 4 ++-- firewall/manifests/init.pp | 2 +- func/manifests/init.pp | 4 ++-- git/manifests/init.pp | 2 +- ifstated/manifests/init.pp | 2 +- iscsi/manifests/init.pp | 2 +- nfs/manifests/init.pp | 2 +- postfix/manifests/init.pp | 14 +++++-------- pulseaudio/manifests/init.pp | 2 +- puppet/manifests/init.pp | 4 ++-- samba/manifests/init.pp | 6 +++--- sasl/manifests/init.pp | 2 +- sendmail/manifests/init.pp | 40 ++++++++++++++++++------------------ yum/manifests/init.pp | 2 +- 17 files changed, 48 insertions(+), 52 deletions(-) diff --git a/apache/manifests/init.pp b/apache/manifests/init.pp index 84324ac..36ff8e8 100644 --- a/apache/manifests/init.pp +++ b/apache/manifests/init.pp @@ -148,7 +148,7 @@ class apache::server inherits apache::common { # $aliases: # Optional ServerAlias for this virtual host. # $root: -# Path to document root. Defaults to /srv/www/http/$fqdn +# Path to document root. Defaults to /srv/www/http/$homename # $redirect: # Add redirect to given URL. # $proxy: @@ -196,7 +196,7 @@ define apache::site($aliases="", $root="", $redirect="", $proxy="") { if !$redirect { $site_fqdn = $name ? { - "default" => $homename, + "default" => $::homename, default => $name, } apache::webalizer::site { "http/${site_fqdn}": @@ -269,7 +269,7 @@ class apache::sslserver::listen { # $ipaddr: # IP address of virtual host. Defaults to _default_. # $root: -# Path to document root. Defaults to /srv/www/https/$fqdn +# Path to document root. Defaults to /srv/www/https/$homename # $ssl_cert: # Path to SSL certificate. Defaults to puppet client certificate. # $ssl_key: @@ -320,7 +320,7 @@ define apache::sslsite($first=false, $ipaddr="_default_", $root="", $ssl_cert="" } $site_fqdn = $name ? { - "default" => $homename, + "default" => $::homename, default => $name, } apache::webalizer::site { "https/${site_fqdn}": diff --git a/cups/manifests/init.pp b/cups/manifests/init.pp index bb10f32..444a2b6 100644 --- a/cups/manifests/init.pp +++ b/cups/manifests/init.pp @@ -63,7 +63,7 @@ class cups::server inherits cups::client { file { "/etc/cups/cupsd.conf": ensure => present, - source => [ "puppet:///files/cups/cupsd.conf.${fqdn}", + source => [ "puppet:///files/cups/cupsd.conf.${::homename}", "puppet:///files/cups/cupsd.conf", "puppet:///modules/cups/cupsd.conf", ], mode => "0640", diff --git a/dhcp/manifests/init.pp b/dhcp/manifests/init.pp index 7afb407..35c7e21 100644 --- a/dhcp/manifests/init.pp +++ b/dhcp/manifests/init.pp @@ -103,7 +103,7 @@ class dhcp::server inherits dhcp::server::common { file { "dhcpd.conf": name => "${confdir}/dhcpd.conf", ensure => present, - source => [ "puppet:///files/dhcp/dhcpd.conf.${fqdn}", + source => [ "puppet:///files/dhcp/dhcpd.conf.${::homename}", "puppet:///files/dhcp/dhcpd.conf", ], mode => "0644", owner => "root", diff --git a/dns/manifests/init.pp b/dns/manifests/init.pp index b12dcc3..fbe08b7 100644 --- a/dns/manifests/init.pp +++ b/dns/manifests/init.pp @@ -203,7 +203,7 @@ class dns::server { file { "${chroot}${confdir}/named.conf.options": ensure => present, - source => [ "puppet:///files/dns/named.conf.options.${fqdn}", + source => [ "puppet:///files/dns/named.conf.options.${::homename}", "puppet:///files/dns/named.conf.options", "puppet:///modules/dns/named.conf.options", ], mode => "0640", @@ -218,7 +218,7 @@ class dns::server { file { "${chroot}${confdir}/named.conf.local": ensure => present, - source => [ "puppet:///files/dns/named.conf.local.${fqdn}", + source => [ "puppet:///files/dns/named.conf.local.${::homename}", "puppet:///files/dns/named.conf.local", "puppet:///modules/dns/named.conf.local", ], mode => "0640", diff --git a/firewall/manifests/init.pp b/firewall/manifests/init.pp index ddb3d76..42aaaad 100644 --- a/firewall/manifests/init.pp +++ b/firewall/manifests/init.pp @@ -50,7 +50,7 @@ class firewall { # # Config file is searched in following order: # -# puppet:///files/firewall/${config}.${fqdn} +# puppet:///files/firewall/${config}.${homename} # puppet:///files/firewall/${config} # # where config is firewall configuration file name diff --git a/func/manifests/init.pp b/func/manifests/init.pp index c809e5c..e2125ba 100644 --- a/func/manifests/init.pp +++ b/func/manifests/init.pp @@ -18,7 +18,7 @@ class func::minion { file { "/etc/pki/certmaster/${hostname}.pem": ensure => present, - source => "${puppet_ssldir}/private_keys/${fqdn}.pem", + source => "${puppet_ssldir}/private_keys/${::homename}.pem", mode => "0600", owner => "root", group => "root", @@ -27,7 +27,7 @@ class func::minion { } file { "/etc/pki/certmaster/${hostname}.cert": ensure => present, - source => "${puppet_ssldir}/certs/${fqdn}.pem", + source => "${puppet_ssldir}/certs/${::homename}.pem", mode => "0644", owner => "root", group => "root", diff --git a/git/manifests/init.pp b/git/manifests/init.pp index dea1270..dca24d6 100644 --- a/git/manifests/init.pp +++ b/git/manifests/init.pp @@ -108,7 +108,7 @@ class git::gitweb inherits git::server { file { "/var/www/git/gitweb_config.perl": ensure => present, - source => [ "puppet:///files/git/gitweb_config.perl.${fqdn}", + source => [ "puppet:///files/git/gitweb_config.perl.${::homename}", "puppet:///files/git/gitweb_config.perl", "puppet:///modules/git/gitweb_config.perl", ], mode => "0644", diff --git a/ifstated/manifests/init.pp b/ifstated/manifests/init.pp index 14dcc5f..3401fb0 100644 --- a/ifstated/manifests/init.pp +++ b/ifstated/manifests/init.pp @@ -6,7 +6,7 @@ class ifstated { file { "/etc/ifstated.conf": ensure => present, source => [ "puppet:///private/ifstated.conf", - "puppet:///files/firewall/ifstated.conf.${fqdn}", + "puppet:///files/firewall/ifstated.conf.${::homename}", "puppet:///files/firewall/ifstated.conf", ], mode => "0644", owner => "root", diff --git a/iscsi/manifests/init.pp b/iscsi/manifests/init.pp index 8e78887..c81a9cb 100644 --- a/iscsi/manifests/init.pp +++ b/iscsi/manifests/init.pp @@ -15,7 +15,7 @@ class iscsi::server { file { "/etc/tgt/targets.conf": ensure => present, - source => [ "puppet:///files/iscsi/targets.conf.${fqdn}", + source => [ "puppet:///files/iscsi/targets.conf.${::homename}", "puppet:///files/iscsi/targets.conf", "puppet:///modules/iscsi/targets.conf", ], mode => "0600", diff --git a/nfs/manifests/init.pp b/nfs/manifests/init.pp index bcc61af..33dc455 100644 --- a/nfs/manifests/init.pp +++ b/nfs/manifests/init.pp @@ -48,7 +48,7 @@ class nfs::server { file { "/etc/exports": ensure => present, source => [ - "puppet:///files/nfs/exports.${::fqdn}", + "puppet:///files/nfs/exports.${::homename}", "puppet:///modules/nfs/exports", ], mode => "0644", diff --git a/postfix/manifests/init.pp b/postfix/manifests/init.pp index e0dab96..71c7ae7 100644 --- a/postfix/manifests/init.pp +++ b/postfix/manifests/init.pp @@ -12,7 +12,7 @@ # Optional smarthost used for sending mail. # # $postfix_hostname: -# Hostname of postfix server. Defaults to $fqdn. +# Hostname of postfix server. Defaults to $homename. # # $postfix_interfaces: # Interfaces to listen. Defaults to 'localhost'. @@ -55,19 +55,15 @@ class postfix { } if !$mail_domain { - if $domain { - $mail_domain = $domain + if $::domain { + $mail_domain = $::domain } else { fail("Failed to set \$mail_domain, missing \$domain") } } if !$postfix_hostname { - if $fqdn { - $postfix_hostname = $fqdn - } else { - fail("Failed to set \$postfix_hostname, missing \$fqdn") - } + $postfix_hostname = $::homename } if !$postfix_interfaces { @@ -105,7 +101,7 @@ class postfix { require => Package["postfix"], notify => Service["postfix"], } - + exec { "usermod-postfix-ssl-cert": path => "/bin:/usr/bin:/sbin:/usr/sbin", command => "usermod -a -G ssl-cert postfix", diff --git a/pulseaudio/manifests/init.pp b/pulseaudio/manifests/init.pp index c63a5be..2b247b4 100644 --- a/pulseaudio/manifests/init.pp +++ b/pulseaudio/manifests/init.pp @@ -37,7 +37,7 @@ class pulseaudio::server inherits pulseaudio::common { file { "/etc/pulse/system.pa": ensure => present, - source => [ "puppet:///files/pulseaudio/system.pa.${fqdn}", + source => [ "puppet:///files/pulseaudio/system.pa.${::homename}", "puppet:///files/pulseaudio/system.pa", ], mode => "0644", owner => root, diff --git a/puppet/manifests/init.pp b/puppet/manifests/init.pp index 2e53fa5..23743a9 100644 --- a/puppet/manifests/init.pp +++ b/puppet/manifests/init.pp @@ -402,7 +402,7 @@ class puppet::server::common inherits puppet::client { file { "/etc/puppet/tagmail.conf": ensure => present, - source => [ "puppet:///files/puppet/tagmail.conf.${fqdn}", + source => [ "puppet:///files/puppet/tagmail.conf.${::homename}", "puppet:///files/puppet/tagmail.conf", "puppet:///modules/puppet/tagmail.conf", ], mode => "0644", @@ -416,7 +416,7 @@ class puppet::server::common inherits puppet::client { file { "/etc/puppet/fileserver.conf": ensure => present, - source => [ "puppet:///files/puppet/fileserver.conf.${fqdn}", + source => [ "puppet:///files/puppet/fileserver.conf.${::homename}", "puppet:///files/puppet/fileserver.conf", "puppet:///modules/puppet/fileserver.conf", ], mode => "0644", diff --git a/samba/manifests/init.pp b/samba/manifests/init.pp index 0a1f868..15c17cc 100644 --- a/samba/manifests/init.pp +++ b/samba/manifests/init.pp @@ -151,9 +151,9 @@ class samba::server($names=[$::hostname], $auth="tdbsam", file { "/etc/samba/lmhosts": ensure => present, - source => [ "puppet:///files/samba/lmhosts.${fqdn}", - "puppet:///files/samba/lmhosts", - "puppet:///modules/samba/lmhosts", ], + source => [ "puppet:///files/samba/lmhosts.${::homename}", + "puppet:///files/samba/lmhosts", + "puppet:///modules/samba/lmhosts", ], mode => "0644", owner => "root", group => $::operatingsystem ? { diff --git a/sasl/manifests/init.pp b/sasl/manifests/init.pp index abd0f86..4eb9101 100644 --- a/sasl/manifests/init.pp +++ b/sasl/manifests/init.pp @@ -183,7 +183,7 @@ define sasl::saslauthd::service($content=undef) { ensure => present, content => $content, source => $content ? { - undef => [ "puppet:///files/sasl/${name}.${fqdn}.conf", + undef => [ "puppet:///files/sasl/${name}.${::homename}.conf", "puppet:///files/sasl/${name}.conf", "puppet:///files/sasl/service.conf", "puppet:///modules/sasl/service.conf", ], diff --git a/sendmail/manifests/init.pp b/sendmail/manifests/init.pp index b75afcb..9dcad6b 100644 --- a/sendmail/manifests/init.pp +++ b/sendmail/manifests/init.pp @@ -302,14 +302,14 @@ class sendmail::server inherits sendmail::common { file { "/etc/aliases": ensure => present, - source => [ - "puppet:///files/mail/aliases.${fqdn}", - "puppet:///files/mail/aliases", - "puppet:///modules/sendmail/aliases", - ], mode => "0644", owner => "root", group => "root", + source => [ + "puppet:///files/mail/aliases.${::homename}", + "puppet:///files/mail/aliases", + "puppet:///modules/sendmail/aliases", + ], notify => Exec["newaliases"], require => Package["sendmail"], } @@ -324,9 +324,9 @@ class sendmail::server inherits sendmail::common { owner => "root", group => "root", source => [ - "puppet:///files/mail/access.${fqdn}", - "puppet:///files/mail/access", - "puppet:///modules/sendmail/empty", + "puppet:///files/mail/access.${::homename}", + "puppet:///files/mail/access", + "puppet:///modules/sendmail/empty", ], notify => Exec["make access.db"], require => Package["sendmail"], @@ -344,9 +344,9 @@ class sendmail::server inherits sendmail::common { owner => "root", group => "root", source => [ - "puppet:///files/mail/genericstable.${fqdn}", - "puppet:///files/mail/genericstable", - "puppet:///modules/sendmail/empty", + "puppet:///files/mail/genericstable.${::homename}", + "puppet:///files/mail/genericstable", + "puppet:///modules/sendmail/empty", ], notify => Exec["make genericstable.db"], require => Package["sendmail"], @@ -364,9 +364,9 @@ class sendmail::server inherits sendmail::common { owner => "root", group => "root", source => [ - "puppet:///files/mail/mailertable.${fqdn}", - "puppet:///files/mail/mailertable", - "puppet:///modules/sendmail/empty", + "puppet:///files/mail/mailertable.${::homename}", + "puppet:///files/mail/mailertable", + "puppet:///modules/sendmail/empty", ], notify => Exec["make mailertable.db"], require => Package["sendmail"], @@ -384,9 +384,9 @@ class sendmail::server inherits sendmail::common { owner => "root", group => "root", source => [ - "puppet:///files/mail/virtusertable.${fqdn}", - "puppet:///files/mail/virtusertable", - "puppet:///modules/sendmail/empty", + "puppet:///files/mail/virtusertable.${::homename}", + "puppet:///files/mail/virtusertable", + "puppet:///modules/sendmail/empty", ], notify => Exec["make virtusertable.db"], require => Package["sendmail"], @@ -404,9 +404,9 @@ class sendmail::server inherits sendmail::common { owner => "root", group => "root", source => [ - "puppet:///files/mail/local-host-names.${fqdn}", - "puppet:///files/mail/local-host-names", - "puppet:///modules/sendmail/empty", + "puppet:///files/mail/local-host-names.${::homename}", + "puppet:///files/mail/local-host-names", + "puppet:///modules/sendmail/empty", ], notify => Service["sendmail"], require => Package["sendmail"], diff --git a/yum/manifests/init.pp b/yum/manifests/init.pp index 6c3b3e2..f61d04e 100644 --- a/yum/manifests/init.pp +++ b/yum/manifests/init.pp @@ -9,7 +9,7 @@ class yum::updatesd { file { "/etc/yum/yum-updatesd.conf": ensure => present, - source => [ "puppet:///files/yum/yum-updatesd.conf.${fqdn}", + source => [ "puppet:///files/yum/yum-updatesd.conf.${::homename}", "puppet:///files/yum/yum-updatesd.conf", "puppet:///modules/yum/yum-updatesd.conf", ], mode => "0644",