Puppet Class: pxe_install::apache
- Defined in:
- manifests/apache.pp
Summary
Configure webserver for install serverOverview
Configure the Apache webserver for the install server.
Directory where the SSL certs are located.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'manifests/apache.pp', line 52
class pxe_install::apache (
Stdlib::Unixpath $kickstart_dir,
String $kickstart_url,
Stdlib::Unixpath $pub_dir,
String $pub_url,
Stdlib::Unixpath $repos_dir,
String $repos_url,
String $servername,
Array $status_allow_from,
Boolean $create_aliases = true,
Optional[String] $ssl_cert = '',
Optional[String] $ssl_key = '',
Optional[String] $ssl_chain = '',
Optional[String] $ssl_certs_dir = '',
Optional[String] $documentroot = '',
) {
ensure_resource('file', ['/etc/pki/httpd', "/etc/pki/httpd/${servername}"], {
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
})
class { 'apache':
default_vhost => false,
server_tokens => 'Prod',
server_signature => 'Off',
trace_enable => 'Off',
}
class { 'apache::mod::ssl':
}
class { 'apache::mod::status':
allow_from => $status_allow_from,
}
class { 'apache::mod::info':
allow_from => $status_allow_from,
}
if $create_aliases {
$aliases = [
{
alias => $kickstart_url,
path => $kickstart_dir,
},
{
alias => $pub_url,
path => $pub_dir,
},
{
alias => $repos_url,
path => $repos_dir,
}
]
} else {
$aliases = []
}
apache::vhost { $servername: #lint:ignore:security_apache_no_ssl_vhost
port => 80,
docroot => $documentroot,
servername => $servername,
access_log_format => 'combined',
aliases => $aliases,
}
apache::vhost { "${servername} ssl":
port => 443,
ssl => true,
ssl_cipher => '"EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4"', #lint:ignore:140chars
ssl_protocol => 'TLSv1.2',
ssl_honorcipherorder => 'on',
ssl_options => ['+StdEnvVars'],
ssl_cert => $ssl_cert,
ssl_key => $ssl_key,
ssl_chain => $ssl_chain,
ssl_certs_dir => $ssl_certs_dir,
docroot => $documentroot,
servername => $servername,
access_log_format => 'combined',
aliases => $aliases,
}
}
|