diff --git a/CHANGELOG.md b/CHANGELOG.md index 538025b..3d05fe8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ Changelog of Git Changelog.
+
+
# File 'manifests/certbot/config.pp', line 23
@@ -202,62 +210,70 @@ class cd_nagios::certbot::config (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
- if $ng_enable_certbot == true {
+ if $ng_use_https == 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':
- command => "rm -Rf ${ng_forward_conf}",
- creates => '/etc/httpd/conf.d/.cert_created',
+ exec { 'remove_forward_vhost':
+ command => "rm -Rf ${ng_forward_conf}",
+ creates => '/etc/httpd/conf.d/.cert_created',
+ }
+
+ # create temp vhost file
+
+ exec { 'create_temp_vhost':
+ command => template('cd_nagios/certbot/create_tempfile.erb'),
+ cwd => '/tmp',
+ path => ['/bin','/usr/bin'],
+ provider => 'shell',
+ creates => '/etc/httpd/conf.d/.created',
+ notify => Service['httpd'],
+ require => Exec['remove_forward_vhost'],
+ }
+
+ # create cert
+
+ exec { 'create_cert':
+ command => template($ng_get_cert_erb),
+ cwd => '/tmp',
+ path => ['/bin','/usr/bin'],
+ provider => 'shell',
+ 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
+
+ exec { 'remove_temp_vhost':
+ command => "rm -Rf ${ng_certbot_temp_file}",
+ cwd => '/tmp',
+ path => ['/bin','/usr/bin'],
+ provider => 'shell',
+ notify => Service['httpd'],
+ require => Exec['create_cert'],
+ creates => "/etc/letsencrypt/live/${ng_nagios_server}/cert.pem",
+ }
+
+ # renew certs
+
+ exec { 'renew_cert':
+ command => 'certbot renew',
+ cwd => '/tmp',
+ path => ['/bin','/usr/bin','/opt/'],
+ provider => 'shell',
+ notify => Service['httpd'],
+ unless => template($ng_unless_renew_erb),
+ }
}
+ }
- # create temp vhost file
-
- exec { 'create_temp_vhost':
- command => template('cd_nagios/certbot/create_tempfile.erb'),
- cwd => '/tmp',
- path => ['/bin','/usr/bin'],
- provider => 'shell',
- creates => '/etc/httpd/conf.d/.created',
- notify => Service['httpd'],
- }
-
- # create cert
-
- exec { 'create_cert':
- command => template($ng_get_cert_erb),
- cwd => '/tmp',
- path => ['/bin','/usr/bin'],
- provider => 'shell',
- unless => template('cd_nagios/certbot/unless_get_cert.erb'),
- notify => Service['httpd'],
- creates => '/etc/httpd/conf.d/.cert_created',
- }
-
- # remove temp_vhost
-
- exec { 'remove_temp_vhost':
- command => "rm -Rf ${ng_certbot_temp_file}",
- cwd => '/tmp',
- path => ['/bin','/usr/bin'],
- provider => 'shell',
- notify => Service['httpd'],
- require => Exec['create_cert'],
- creates => "/etc/letsencrypt/live/${ng_nagios_server}/cert.pem",
- }
-
- # renew certs
-
- exec { 'renew_cert':
- command => 'certbot renew',
- cwd => '/tmp',
- path => ['/bin','/usr/bin','/opt/'],
- provider => 'shell',
- notify => Service['httpd'],
- unless => template($ng_unless_renew_erb),
- }
+ else {
+ # do nothing as we are not using https and certbot is not required then
}
}
}
@@ -268,7 +284,7 @@ class cd_nagios::certbot::config (
diff --git a/doc/puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html b/doc/puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html
index 3824b22..aaf75aa 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html
@@ -368,7 +368,7 @@ class cd_nagios::client::target (
diff --git a/doc/puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html b/doc/puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html
index 73bc277..f616e46 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html
@@ -207,7 +207,7 @@ class cd_nagios::firewall::iptables (
diff --git a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html
index 8174853..8544b85 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html
@@ -187,7 +187,7 @@ class cd_nagios::main::config (
diff --git a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html
index 2b9fdee..2b94de6 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html
@@ -468,7 +468,7 @@ class cd_nagios::main::dirs (
diff --git a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html
index 6cd79ad..4f9458c 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html
@@ -235,7 +235,7 @@ class cd_nagios::main::install (
diff --git a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html
index c068e14..2c998b9 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html
@@ -200,7 +200,7 @@ class cd_nagios::main::user (
diff --git a/doc/puppet_classes/cd_nagios_3A_3Aparams.html b/doc/puppet_classes/cd_nagios_3A_3Aparams.html
index 972cdf8..e8dbcad 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Aparams.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Aparams.html
@@ -2313,7 +2313,7 @@ $ng_certbot_temp_file = '/etc/httpd/conf.d/certbot_temp.conf'
diff --git a/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html b/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html
index c630b99..8079307 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html
@@ -249,7 +249,7 @@ class cd_nagios::selinux::config (
diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html
index b5388f0..25f8e45 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html
@@ -195,7 +195,7 @@ class cd_nagios::server::access_rules (
diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html
index 7f375d6..6678e28 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html
@@ -452,7 +452,7 @@ class cd_nagios::server::files (
diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html
index ad5dd36..d000904 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html
@@ -174,7 +174,7 @@ class cd_nagios::server::service (
diff --git a/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html b/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html
index ee562d0..c4418eb 100644
--- a/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html
+++ b/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html
@@ -220,7 +220,7 @@ $ng_service = $::cd_nagios::params::ng_service
diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html
index b4500f0..203cc45 100644
--- a/doc/top-level-namespace.html
+++ b/doc/top-level-namespace.html
@@ -90,7 +90,7 @@