Skip to content

Commit

Permalink
Merge pull request #61 from jbonjean/master
Browse files Browse the repository at this point in the history
Decouple management of Apache virtual host
  • Loading branch information
thias committed Oct 6, 2015
2 parents eecf5bd + f7e84fd commit c5dd2c2
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,39 +167,39 @@
require => Package['nagios'],
}

# Set a default content template if no content/source is specified
if $apache_httpd_conf_source == undef {
if $apache_httpd_conf_content == undef {
$apache_httpd_conf_content_final = template("${module_name}/apache_httpd/httpd-nagios.conf.erb")
} else {
$apache_httpd_conf_content_final = $apache_httpd_conf_content
}
}
file { '/etc/httpd/conf.d/nagios.conf':
owner => 'root',
group => 'root',
mode => '0644',
content => $apache_httpd_conf_content_final,
source => $apache_httpd_conf_source,
notify => Service['httpd'],
require => Package['nagios'],
}
if $apache_httpd_htpasswd_source != false {
file { '/etc/nagios/.htpasswd':
owner => 'root',
group => 'apache',
mode => '0640',
source => $apache_httpd_htpasswd_source,
require => Package['nagios'],
}
}

if $apache_httpd {
class { '::apache_httpd':
ssl => $apache_httpd_ssl,
modules => $apache_httpd_modules,
keepalive => 'On',
}

# Set a default content template if no content/source is specified
if $apache_httpd_conf_source == undef {
if $apache_httpd_conf_content == undef {
$apache_httpd_conf_content_final = template("${module_name}/apache_httpd/httpd-nagios.conf.erb")
} else {
$apache_httpd_conf_content_final = $apache_httpd_conf_content
}
}
file { '/etc/httpd/conf.d/nagios.conf':
owner => 'root',
group => 'root',
mode => '0644',
content => $apache_httpd_conf_content_final,
source => $apache_httpd_conf_source,
notify => Service['httpd'],
require => Package['nagios'],
}
if $apache_httpd_htpasswd_source != false {
file { '/etc/nagios/.htpasswd':
owner => 'root',
group => 'apache',
mode => '0640',
source => $apache_httpd_htpasswd_source,
require => Package['nagios'],
}
}
}

if $php {
Expand Down

0 comments on commit c5dd2c2

Please sign in to comment.