re-ordering

This commit is contained in:
Arne Teuke
2017-07-21 16:24:35 +01:00
parent 01324789d2
commit 8db53dcf33

View File

@@ -25,13 +25,14 @@ class cd_nagios::certbot::config (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
if $ng_use_https == true {
if $ng_enable_certbot == true {
require cd_certbot
# ensure there is no forward vhost file
exec { 'remove forward vhost':
exec { 'remove_forward_vhost':
command => "rm -Rf ${ng_forward_conf}",
creates => '/etc/httpd/conf.d/.cert_created',
}
@@ -45,6 +46,7 @@ class cd_nagios::certbot::config (
provider => 'shell',
creates => '/etc/httpd/conf.d/.created',
notify => Service['httpd'],
require => Exec['remove_forward_vhost'],
}
# create cert
@@ -57,6 +59,7 @@ class cd_nagios::certbot::config (
unless => template('cd_nagios/certbot/unless_get_cert.erb'),
notify => Service['httpd'],
creates => '/etc/httpd/conf.d/.cert_created',
require => Exec['create_temp_vhost'],
}
# remove temp_vhost
@@ -83,4 +86,9 @@ class cd_nagios::certbot::config (
}
}
}
else {
# do nothing as we are not using https and certbot is not required then
}
}
}