Replaced fqdn variables with homename

This commit is contained in:
Ossi Salmi 2010-11-08 14:16:04 +02:00 committed by Timo Mkinen
parent c871e91a13
commit 45b597c29c
12 changed files with 39 additions and 39 deletions

View file

@ -8,9 +8,9 @@ class apache::debian::common {
} }
file { [ "/srv/www/http", file { [ "/srv/www/http",
"/srv/www/http/${fqdn}", "/srv/www/http/${homename}",
"/srv/www/log/http", "/srv/www/log/http",
"/srv/www/log/http/${fqdn}", "/srv/www/log/http/${homename}",
"/etc/apache2/conf.d", "/etc/apache2/conf.d",
"/etc/apache2/sites-enabled", ]: "/etc/apache2/sites-enabled", ]:
ensure => directory, ensure => directory,
@ -91,7 +91,7 @@ class apache::debian::server inherits apache::debian::common {
define apache::debian::site($aliases, $root, $redirect) { define apache::debian::site($aliases, $root, $redirect) {
if $name == "default" { if $name == "default" {
$site_fqdn = $fqdn $site_fqdn = $homename
$site_conf = "/etc/apache2/sites-enabled/00-${site_fqdn}.conf" $site_conf = "/etc/apache2/sites-enabled/00-${site_fqdn}.conf"
$site_confdir = "/etc/apache2/sites-enabled/00-${site_fqdn}.d" $site_confdir = "/etc/apache2/sites-enabled/00-${site_fqdn}.d"
} else { } else {
@ -164,9 +164,9 @@ define apache::debian::site($aliases, $root, $redirect) {
class apache::debian::sslserver inherits apache::debian::common { class apache::debian::sslserver inherits apache::debian::common {
file { [ "/srv/www/https", file { [ "/srv/www/https",
"/srv/www/https/${fqdn}", "/srv/www/https/${homename}",
"/srv/www/log/https", "/srv/www/log/https",
"/srv/www/log/https/${fqdn}", ]: "/srv/www/log/https/${homename}", ]:
ensure => directory, ensure => directory,
mode => 0644, mode => 0644,
owner => root, 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) { define apache::debian::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) {
if $name == "default" { if $name == "default" {
$site_fqdn = $fqdn $site_fqdn = $homename
} else { } else {
$site_fqdn = $name $site_fqdn = $name
@ -215,7 +215,7 @@ define apache::debian::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) {
if $ssl_cert { if $ssl_cert {
$real_ssl_cert = $ssl_cert $real_ssl_cert = $ssl_cert
} else { } else {
$real_ssl_cert = "${puppet_ssldir}/certs/${fqdn}.pem" $real_ssl_cert = "${puppet_ssldir}/certs/${homename}.pem"
} }
file { "/etc/ssl/certs/${site_fqdn}.crt": 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 { if $ssl_key {
$real_ssl_key = $ssl_key $real_ssl_key = $ssl_key
} else { } 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": file { "/etc/ssl/private/${site_fqdn}.key":

View file

@ -140,7 +140,7 @@ define apache::site($aliases="", $root="", $redirect="") {
if !$redirect { if !$redirect {
$site_fqdn = $name ? { $site_fqdn = $name ? {
"default" => "${fqdn}", "default" => "${homename}",
default => "${name}", default => "${name}",
} }
apache::webalizer::site { "http/${site_fqdn}": apache::webalizer::site { "http/${site_fqdn}":
@ -228,7 +228,7 @@ define apache::sslsite($root="", $ssl_cert="", $ssl_key="", $ssl_chain="") {
} }
$site_fqdn = $name ? { $site_fqdn = $name ? {
"default" => "${fqdn}", "default" => "${homename}",
default => "${name}", default => "${name}",
} }
apache::webalizer::site { "https/${site_fqdn}": apache::webalizer::site { "https/${site_fqdn}":

View file

@ -10,9 +10,9 @@ class apache::redhat::server {
file { [ "/etc/httpd/conf.http.d", file { [ "/etc/httpd/conf.http.d",
"/etc/httpd/site.http.d", "/etc/httpd/site.http.d",
"/srv/www/http", "/srv/www/http",
"/srv/www/http/${fqdn}", "/srv/www/http/${homename}",
"/srv/www/log/http", "/srv/www/log/http",
"/srv/www/log/http/${fqdn}", ]: "/srv/www/log/http/${homename}", ]:
ensure => directory, ensure => directory,
mode => 0644, mode => 0644,
owner => root, owner => root,
@ -51,7 +51,7 @@ class apache::redhat::server {
define apache::redhat::site($aliases, $root, $redirect) { define apache::redhat::site($aliases, $root, $redirect) {
if $name == "default" { if $name == "default" {
$site_fqdn = $fqdn $site_fqdn = $homename
$site_conf = "/etc/httpd/site.http.d/00-${site_fqdn}.conf" $site_conf = "/etc/httpd/site.http.d/00-${site_fqdn}.conf"
$site_confdir = "/etc/httpd/site.http.d/00-${site_fqdn}.d" $site_confdir = "/etc/httpd/site.http.d/00-${site_fqdn}.d"
} else { } else {
@ -136,9 +136,9 @@ class apache::redhat::sslserver {
file { [ "/etc/httpd/conf.https.d", file { [ "/etc/httpd/conf.https.d",
"/etc/httpd/site.https.d", "/etc/httpd/site.https.d",
"/srv/www/https", "/srv/www/https",
"/srv/www/https/${fqdn}", "/srv/www/https/${homename}",
"/srv/www/log/https", "/srv/www/log/https",
"/srv/www/log/https/${fqdn}", ]: "/srv/www/log/https/${homename}", ]:
ensure => directory, ensure => directory,
mode => 0644, mode => 0644,
owner => root, owner => root,
@ -198,7 +198,7 @@ class apache::redhat::sslserver {
define apache::redhat::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) { define apache::redhat::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) {
if $name == "default" { if $name == "default" {
$site_fqdn = $fqdn $site_fqdn = $homename
} else { } else {
$site_fqdn = $name $site_fqdn = $name
@ -230,7 +230,7 @@ define apache::redhat::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) {
if $ssl_cert { if $ssl_cert {
$real_ssl_cert = $ssl_cert $real_ssl_cert = $ssl_cert
} else { } 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": 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 { if $ssl_key {
$real_ssl_key = $ssl_key $real_ssl_key = $ssl_key
} else { } 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": file { "/etc/pki/tls/private/${site_fqdn}.key":

View file

@ -191,7 +191,7 @@ HostnameLookups Off
# logged here. If you *do* define an error logfile for a <VirtualHost> # logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here. # 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. # 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 # 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, # Include of directories ignores editors' and dpkg's backup files,

View file

@ -17,7 +17,7 @@ ServerAdmin adm@<%= domain %>
# You will have to access it by its address anyway, and this will make # You will have to access it by its address anyway, and this will make
# redirections work in a sensible way. # redirections work in a sensible way.
# #
ServerName <%= fqdn %> ServerName <%= homename %>
# #
# UseCanonicalName: Determines how Apache constructs self-referencing # UseCanonicalName: Determines how Apache constructs self-referencing

View file

@ -265,7 +265,7 @@ ServerAdmin adm@<%= domain %>
# redirections work in a sensible way. # redirections work in a sensible way.
# #
#ServerName www.example.com:80 #ServerName www.example.com:80
ServerName <%= fqdn %> ServerName <%= homename %>
# #
# UseCanonicalName: Determines how Apache constructs self-referencing # UseCanonicalName: Determines how Apache constructs self-referencing
@ -281,7 +281,7 @@ UseCanonicalName Off
# documents. By default, all requests are taken from this directory, but # documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations. # 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 # 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 <VirtualHost> # logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here. # 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. # 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 # For a single logfile with access, agent, and referer information
# (Combined Logfile Format), use the following directive: # (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 # Optionally add a line containing the server version and virtual host

View file

@ -265,7 +265,7 @@ ServerAdmin adm@<%= domain %>
# redirections work in a sensible way. # redirections work in a sensible way.
# #
#ServerName www.example.com:80 #ServerName www.example.com:80
ServerName <%= fqdn %> ServerName <%= homename %>
# #
# UseCanonicalName: Determines how Apache constructs self-referencing # UseCanonicalName: Determines how Apache constructs self-referencing
@ -281,7 +281,7 @@ UseCanonicalName Off
# documents. By default, all requests are taken from this directory, but # documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations. # 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 # 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 <VirtualHost> # logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here. # 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. # 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 # For a single logfile with access, agent, and referer information
# (Combined Logfile Format), use the following directive: # (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 # Optionally add a line containing the server version and virtual host

View file

@ -37,7 +37,7 @@ define backuppc::manualclient($ensure = "present", $operatingsystem = "default")
# #
class backuppc::client { class backuppc::client {
backuppc::manualclient { "${fqdn}": backuppc::manualclient { "${homename}":
ensure => present, ensure => present,
operatingsystem => "${operatingsystem}", operatingsystem => "${operatingsystem}",
} }

View file

@ -14,7 +14,7 @@ config['klist'] = '/usr/kerberos/bin/klist'
# set global vars # set global vars
cachefile = File.join(config['cachedir'], cachefile = File.join(config['cachedir'],
fqdn + '.' + Digest::MD5.hexdigest(name)) homename + '.' + Digest::MD5.hexdigest(name))
# function to check if keytab contains required principals # function to check if keytab contains required principals

View file

@ -34,8 +34,8 @@ class munin::node {
notify => Exec["munin-node-configure"], notify => Exec["munin-node-configure"],
} }
@@file { "/etc/munin/nodes.d/${fqdn}.conf": @@file { "/etc/munin/nodes.d/${homename}.conf":
content => "[${fqdn}]\n address ${ipaddress}\n use_node_name yes\n", content => "[${homename}]\n address ${ipaddress}\n use_node_name yes\n",
ensure => present, ensure => present,
tag => "munin", tag => "munin",
notify => Exec["generate-munin-conf"], notify => Exec["generate-munin-conf"],

View file

@ -30,7 +30,7 @@ ignore_file \.pod$
# telnetting to localhost, port 4949 # telnetting to localhost, port 4949
# #
#host_name ppc3.fedora.redhat.com #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 # A list of addresses that are allowed to connect. This must be a
# regular expression, due to brain damage in Net::Server, which # regular expression, due to brain damage in Net::Server, which

View file

@ -26,8 +26,8 @@ Listen 8140
# Use separate log files for the SSL virtual host; note that LogLevel # Use separate log files for the SSL virtual host; note that LogLevel
# is not inherited from httpd.conf. # is not inherited from httpd.conf.
ErrorLog /srv/www/log/https/<%= fqdn %>/error_log ErrorLog /srv/www/log/https/<%= homename %>/error_log
CustomLog /srv/www/log/https/<%= fqdn %>/access_log combined CustomLog /srv/www/log/https/<%= homename %>/access_log combined
LogLevel warn LogLevel warn
# SSL Engine Switch: # SSL Engine Switch:
@ -44,14 +44,14 @@ SSLCipherSuite SSLv2:-LOW:-EXPORT:RC4+RSA
# the certificate is encrypted, then you will be prompted for a # the certificate is encrypted, then you will be prompted for a
# pass phrase. Note that a kill -HUP will prompt again. A new # pass phrase. Note that a kill -HUP will prompt again. A new
# certificate can be generated using the genkey(1) command. # certificate can be generated using the genkey(1) command.
SSLCertificateFile <%= puppet_ssldir %>/certs/<%= fqdn %>.pem SSLCertificateFile <%= puppet_ssldir %>/certs/<%= homename %>.pem
# Server Private Key: # Server Private Key:
# If the key is not combined with the certificate, use this # If the key is not combined with the certificate, use this
# directive to point at the key file. Keep in mind that if # 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 # 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.) # 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: # Server Certificate Chain:
# Point SSLCertificateChainFile at a file containing the # Point SSLCertificateChainFile at a file containing the