re-ordering
This commit is contained in:
@@ -25,13 +25,14 @@ class cd_nagios::certbot::config (
|
|||||||
) inherits cd_nagios::params {
|
) inherits cd_nagios::params {
|
||||||
|
|
||||||
if $::fqdn == $ng_nagios_server {
|
if $::fqdn == $ng_nagios_server {
|
||||||
|
if $ng_use_https == true {
|
||||||
if $ng_enable_certbot == true {
|
if $ng_enable_certbot == true {
|
||||||
|
|
||||||
require cd_certbot
|
require cd_certbot
|
||||||
|
|
||||||
# ensure there is no forward vhost file
|
# ensure there is no forward vhost file
|
||||||
|
|
||||||
exec { 'remove forward vhost':
|
exec { 'remove_forward_vhost':
|
||||||
command => "rm -Rf ${ng_forward_conf}",
|
command => "rm -Rf ${ng_forward_conf}",
|
||||||
creates => '/etc/httpd/conf.d/.cert_created',
|
creates => '/etc/httpd/conf.d/.cert_created',
|
||||||
}
|
}
|
||||||
@@ -45,6 +46,7 @@ class cd_nagios::certbot::config (
|
|||||||
provider => 'shell',
|
provider => 'shell',
|
||||||
creates => '/etc/httpd/conf.d/.created',
|
creates => '/etc/httpd/conf.d/.created',
|
||||||
notify => Service['httpd'],
|
notify => Service['httpd'],
|
||||||
|
require => Exec['remove_forward_vhost'],
|
||||||
}
|
}
|
||||||
|
|
||||||
# create cert
|
# create cert
|
||||||
@@ -57,6 +59,7 @@ class cd_nagios::certbot::config (
|
|||||||
unless => template('cd_nagios/certbot/unless_get_cert.erb'),
|
unless => template('cd_nagios/certbot/unless_get_cert.erb'),
|
||||||
notify => Service['httpd'],
|
notify => Service['httpd'],
|
||||||
creates => '/etc/httpd/conf.d/.cert_created',
|
creates => '/etc/httpd/conf.d/.cert_created',
|
||||||
|
require => Exec['create_temp_vhost'],
|
||||||
}
|
}
|
||||||
|
|
||||||
# remove 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
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user