From 45b597c29c11d3aec4645635e8d9dea4589f6733 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Mon, 8 Nov 2010 14:16:04 +0200 Subject: [PATCH] Replaced fqdn variables with homename --- apache/manifests/debian.pp | 16 ++++++++-------- apache/manifests/init.pp | 4 ++-- apache/manifests/redhat.pp | 16 ++++++++-------- apache/templates/apache2.conf.erb | 4 ++-- apache/templates/apache2.httpd.conf.erb | 2 +- apache/templates/httpd.conf.erb | 8 ++++---- apache/templates/httpsd.conf.erb | 8 ++++---- backuppc/manifests/init.pp | 2 +- kerberos/templates/keytab.erb | 4 ++-- munin/manifests/init.pp | 4 ++-- munin/templates/munin-node.conf.erb | 2 +- puppet/templates/puppet-httpd.conf.erb | 8 ++++---- 12 files changed, 39 insertions(+), 39 deletions(-) diff --git a/apache/manifests/debian.pp b/apache/manifests/debian.pp index 7f3a462..981fd3b 100644 --- a/apache/manifests/debian.pp +++ b/apache/manifests/debian.pp @@ -8,9 +8,9 @@ class apache::debian::common { } file { [ "/srv/www/http", - "/srv/www/http/${fqdn}", + "/srv/www/http/${homename}", "/srv/www/log/http", - "/srv/www/log/http/${fqdn}", + "/srv/www/log/http/${homename}", "/etc/apache2/conf.d", "/etc/apache2/sites-enabled", ]: ensure => directory, @@ -91,7 +91,7 @@ class apache::debian::server inherits apache::debian::common { define apache::debian::site($aliases, $root, $redirect) { if $name == "default" { - $site_fqdn = $fqdn + $site_fqdn = $homename $site_conf = "/etc/apache2/sites-enabled/00-${site_fqdn}.conf" $site_confdir = "/etc/apache2/sites-enabled/00-${site_fqdn}.d" } else { @@ -164,9 +164,9 @@ define apache::debian::site($aliases, $root, $redirect) { class apache::debian::sslserver inherits apache::debian::common { file { [ "/srv/www/https", - "/srv/www/https/${fqdn}", + "/srv/www/https/${homename}", "/srv/www/log/https", - "/srv/www/log/https/${fqdn}", ]: + "/srv/www/log/https/${homename}", ]: ensure => directory, mode => 0644, owner => root, @@ -183,7 +183,7 @@ class apache::debian::sslserver inherits apache::debian::common { define apache::debian::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) { if $name == "default" { - $site_fqdn = $fqdn + $site_fqdn = $homename } else { $site_fqdn = $name @@ -215,7 +215,7 @@ define apache::debian::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) { if $ssl_cert { $real_ssl_cert = $ssl_cert } else { - $real_ssl_cert = "${puppet_ssldir}/certs/${fqdn}.pem" + $real_ssl_cert = "${puppet_ssldir}/certs/${homename}.pem" } file { "/etc/ssl/certs/${site_fqdn}.crt": @@ -230,7 +230,7 @@ define apache::debian::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) { if $ssl_key { $real_ssl_key = $ssl_key } else { - $real_ssl_key = "${puppet_ssldir}/private_keys/${fqdn}.pem" + $real_ssl_key = "${puppet_ssldir}/private_keys/${homename}.pem" } file { "/etc/ssl/private/${site_fqdn}.key": diff --git a/apache/manifests/init.pp b/apache/manifests/init.pp index 9ed0917..64db96d 100644 --- a/apache/manifests/init.pp +++ b/apache/manifests/init.pp @@ -140,7 +140,7 @@ define apache::site($aliases="", $root="", $redirect="") { if !$redirect { $site_fqdn = $name ? { - "default" => "${fqdn}", + "default" => "${homename}", default => "${name}", } apache::webalizer::site { "http/${site_fqdn}": @@ -228,7 +228,7 @@ define apache::sslsite($root="", $ssl_cert="", $ssl_key="", $ssl_chain="") { } $site_fqdn = $name ? { - "default" => "${fqdn}", + "default" => "${homename}", default => "${name}", } apache::webalizer::site { "https/${site_fqdn}": diff --git a/apache/manifests/redhat.pp b/apache/manifests/redhat.pp index a5204fc..c4bbca3 100644 --- a/apache/manifests/redhat.pp +++ b/apache/manifests/redhat.pp @@ -10,9 +10,9 @@ class apache::redhat::server { file { [ "/etc/httpd/conf.http.d", "/etc/httpd/site.http.d", "/srv/www/http", - "/srv/www/http/${fqdn}", + "/srv/www/http/${homename}", "/srv/www/log/http", - "/srv/www/log/http/${fqdn}", ]: + "/srv/www/log/http/${homename}", ]: ensure => directory, mode => 0644, owner => root, @@ -51,7 +51,7 @@ class apache::redhat::server { define apache::redhat::site($aliases, $root, $redirect) { if $name == "default" { - $site_fqdn = $fqdn + $site_fqdn = $homename $site_conf = "/etc/httpd/site.http.d/00-${site_fqdn}.conf" $site_confdir = "/etc/httpd/site.http.d/00-${site_fqdn}.d" } else { @@ -136,9 +136,9 @@ class apache::redhat::sslserver { file { [ "/etc/httpd/conf.https.d", "/etc/httpd/site.https.d", "/srv/www/https", - "/srv/www/https/${fqdn}", + "/srv/www/https/${homename}", "/srv/www/log/https", - "/srv/www/log/https/${fqdn}", ]: + "/srv/www/log/https/${homename}", ]: ensure => directory, mode => 0644, owner => root, @@ -198,7 +198,7 @@ class apache::redhat::sslserver { define apache::redhat::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) { if $name == "default" { - $site_fqdn = $fqdn + $site_fqdn = $homename } else { $site_fqdn = $name @@ -230,7 +230,7 @@ define apache::redhat::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) { if $ssl_cert { $real_ssl_cert = $ssl_cert } else { - $real_ssl_cert = "${puppet_ssldir}/certs/${fqdn}.pem" + $real_ssl_cert = "${puppet_ssldir}/certs/${homename}.pem" } file { "/etc/pki/tls/certs/${site_fqdn}.crt": @@ -245,7 +245,7 @@ define apache::redhat::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) { if $ssl_key { $real_ssl_key = $ssl_key } else { - $real_ssl_key = "${puppet_ssldir}/private_keys/${fqdn}.pem" + $real_ssl_key = "${puppet_ssldir}/private_keys/${homename}.pem" } file { "/etc/pki/tls/private/${site_fqdn}.key": diff --git a/apache/templates/apache2.conf.erb b/apache/templates/apache2.conf.erb index 9d8d2e7..1fe23fe 100644 --- a/apache/templates/apache2.conf.erb +++ b/apache/templates/apache2.conf.erb @@ -191,7 +191,7 @@ HostnameLookups Off # logged here. If you *do* define an error logfile for a # container, that host's errors will be logged there and not here. # -ErrorLog /srv/www/log/http/<%= fqdn %>/error_log +ErrorLog /srv/www/log/http/<%= homename %>/error_log # # LogLevel: Control the number of messages logged to the error_log. @@ -223,7 +223,7 @@ LogFormat "%{User-agent}i" agent # # Define an access log for VirtualHosts that don't define their own logfile -CustomLog /srv/www/log/http/<%= fqdn %>/access_log combined +CustomLog /srv/www/log/http/<%= homename %>/access_log combined # Include of directories ignores editors' and dpkg's backup files, diff --git a/apache/templates/apache2.httpd.conf.erb b/apache/templates/apache2.httpd.conf.erb index feb1e41..4050592 100644 --- a/apache/templates/apache2.httpd.conf.erb +++ b/apache/templates/apache2.httpd.conf.erb @@ -17,7 +17,7 @@ ServerAdmin adm@<%= domain %> # You will have to access it by its address anyway, and this will make # redirections work in a sensible way. # -ServerName <%= fqdn %> +ServerName <%= homename %> # # UseCanonicalName: Determines how Apache constructs self-referencing diff --git a/apache/templates/httpd.conf.erb b/apache/templates/httpd.conf.erb index fe5bc78..684056a 100644 --- a/apache/templates/httpd.conf.erb +++ b/apache/templates/httpd.conf.erb @@ -265,7 +265,7 @@ ServerAdmin adm@<%= domain %> # redirections work in a sensible way. # #ServerName www.example.com:80 -ServerName <%= fqdn %> +ServerName <%= homename %> # # UseCanonicalName: Determines how Apache constructs self-referencing @@ -281,7 +281,7 @@ UseCanonicalName Off # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # -DocumentRoot "/srv/www/http/<%= fqdn %>" +DocumentRoot "/srv/www/http/<%= homename %>" # # Each directory to which Apache has access can be configured with respect @@ -474,7 +474,7 @@ HostnameLookups Off # logged here. If you *do* define an error logfile for a # container, that host's errors will be logged there and not here. # -ErrorLog /srv/www/log/http/<%= fqdn %>/error_log +ErrorLog /srv/www/log/http/<%= homename %>/error_log # # LogLevel: Control the number of messages logged to the error_log. @@ -516,7 +516,7 @@ LogFormat "%{User-agent}i" agent # For a single logfile with access, agent, and referer information # (Combined Logfile Format), use the following directive: # -CustomLog /srv/www/log/http/<%= fqdn %>/access_log combined +CustomLog /srv/www/log/http/<%= homename %>/access_log combined # # Optionally add a line containing the server version and virtual host diff --git a/apache/templates/httpsd.conf.erb b/apache/templates/httpsd.conf.erb index 437b867..3df318c 100644 --- a/apache/templates/httpsd.conf.erb +++ b/apache/templates/httpsd.conf.erb @@ -265,7 +265,7 @@ ServerAdmin adm@<%= domain %> # redirections work in a sensible way. # #ServerName www.example.com:80 -ServerName <%= fqdn %> +ServerName <%= homename %> # # UseCanonicalName: Determines how Apache constructs self-referencing @@ -281,7 +281,7 @@ UseCanonicalName Off # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # -DocumentRoot "/srv/www/https/<%= fqdn %>" +DocumentRoot "/srv/www/https/<%= homename %>" # # Each directory to which Apache has access can be configured with respect @@ -474,7 +474,7 @@ HostnameLookups Off # logged here. If you *do* define an error logfile for a # container, that host's errors will be logged there and not here. # -ErrorLog /srv/www/log/https/<%= fqdn %>/error_log +ErrorLog /srv/www/log/https/<%= homename %>/error_log # # LogLevel: Control the number of messages logged to the error_log. @@ -516,7 +516,7 @@ LogFormat "%{User-agent}i" agent # For a single logfile with access, agent, and referer information # (Combined Logfile Format), use the following directive: # -CustomLog /srv/www/log/https/<%= fqdn %>/access_log combined +CustomLog /srv/www/log/https/<%= homename %>/access_log combined # # Optionally add a line containing the server version and virtual host diff --git a/backuppc/manifests/init.pp b/backuppc/manifests/init.pp index c38240b..2f02170 100644 --- a/backuppc/manifests/init.pp +++ b/backuppc/manifests/init.pp @@ -37,7 +37,7 @@ define backuppc::manualclient($ensure = "present", $operatingsystem = "default") # class backuppc::client { - backuppc::manualclient { "${fqdn}": + backuppc::manualclient { "${homename}": ensure => present, operatingsystem => "${operatingsystem}", } diff --git a/kerberos/templates/keytab.erb b/kerberos/templates/keytab.erb index df6db0b..8532811 100644 --- a/kerberos/templates/keytab.erb +++ b/kerberos/templates/keytab.erb @@ -14,7 +14,7 @@ config['klist'] = '/usr/kerberos/bin/klist' # set global vars cachefile = File.join(config['cachedir'], - fqdn + '.' + Digest::MD5.hexdigest(name)) + homename + '.' + Digest::MD5.hexdigest(name)) # function to check if keytab contains required principals @@ -70,4 +70,4 @@ end # read keytab into memory data = File.open(cachefile).read --%><%= data -%> \ No newline at end of file +-%><%= data -%> diff --git a/munin/manifests/init.pp b/munin/manifests/init.pp index 7fc4104..4852203 100644 --- a/munin/manifests/init.pp +++ b/munin/manifests/init.pp @@ -34,8 +34,8 @@ class munin::node { notify => Exec["munin-node-configure"], } - @@file { "/etc/munin/nodes.d/${fqdn}.conf": - content => "[${fqdn}]\n address ${ipaddress}\n use_node_name yes\n", + @@file { "/etc/munin/nodes.d/${homename}.conf": + content => "[${homename}]\n address ${ipaddress}\n use_node_name yes\n", ensure => present, tag => "munin", notify => Exec["generate-munin-conf"], diff --git a/munin/templates/munin-node.conf.erb b/munin/templates/munin-node.conf.erb index 0c44d99..d743c6a 100644 --- a/munin/templates/munin-node.conf.erb +++ b/munin/templates/munin-node.conf.erb @@ -30,7 +30,7 @@ ignore_file \.pod$ # telnetting to localhost, port 4949 # #host_name ppc3.fedora.redhat.com -host_name <%= fqdn %> +host_name <%= homename %> # A list of addresses that are allowed to connect. This must be a # regular expression, due to brain damage in Net::Server, which diff --git a/puppet/templates/puppet-httpd.conf.erb b/puppet/templates/puppet-httpd.conf.erb index 21b1c66..af3528d 100644 --- a/puppet/templates/puppet-httpd.conf.erb +++ b/puppet/templates/puppet-httpd.conf.erb @@ -26,8 +26,8 @@ Listen 8140 # Use separate log files for the SSL virtual host; note that LogLevel # is not inherited from httpd.conf. -ErrorLog /srv/www/log/https/<%= fqdn %>/error_log -CustomLog /srv/www/log/https/<%= fqdn %>/access_log combined +ErrorLog /srv/www/log/https/<%= homename %>/error_log +CustomLog /srv/www/log/https/<%= homename %>/access_log combined LogLevel warn # SSL Engine Switch: @@ -44,14 +44,14 @@ SSLCipherSuite SSLv2:-LOW:-EXPORT:RC4+RSA # the certificate is encrypted, then you will be prompted for a # pass phrase. Note that a kill -HUP will prompt again. A new # certificate can be generated using the genkey(1) command. -SSLCertificateFile <%= puppet_ssldir %>/certs/<%= fqdn %>.pem +SSLCertificateFile <%= puppet_ssldir %>/certs/<%= homename %>.pem # Server Private Key: # If the key is not combined with the certificate, use this # directive to point at the key file. Keep in mind that if # you've both a RSA and a DSA private key you can configure # both in parallel (to also allow the use of DSA ciphers, etc.) -SSLCertificateKeyFile <%= puppet_ssldir %>/private_keys/<%= fqdn %>.pem +SSLCertificateKeyFile <%= puppet_ssldir %>/private_keys/<%= homename %>.pem # Server Certificate Chain: # Point SSLCertificateChainFile at a file containing the