Skip to content

Commit 5fe1c09

Browse files
authored
Added configuration to enable/disable maintenance with Puppet (#170)
* Added configuration to enable/disable maintenance with Puppet * Fixed formatting in maintenance.enable file resource * Remove undef check for maintenance_enabled
1 parent 0ba762d commit 5fe1c09

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

manifests/config.pp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,19 @@
9494
mode => '0755',
9595
}
9696

97+
if $openondemand::maintenance_enabled {
98+
$maintenance_enable_ensure = 'file'
99+
} else {
100+
$maintenance_enable_ensure = 'absent'
101+
}
102+
103+
file { '/etc/ood/maintenance.enable':
104+
ensure => $maintenance_enable_ensure,
105+
owner => 'root',
106+
group => 'root',
107+
mode => '0644',
108+
}
109+
97110
file { '/etc/ood/config':
98111
ensure => 'directory',
99112
owner => 'root',

manifests/init.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
# Source for maintenance index.html
6767
# @param maintenance_content
6868
# Content for maintenance index.html
69+
# @param maintenance_enabled
70+
# Enable maintenance mode in OOD
6971
# @param security_csp_frame_ancestors
7072
# ood_portal.yml security_csp_frame_ancestors
7173
# @param security_strict_transport
@@ -286,6 +288,7 @@
286288
Array $maintenance_ip_allowlist = [],
287289
Optional[String] $maintenance_source = undef,
288290
Optional[String] $maintenance_content = undef,
291+
Optional[Boolean] $maintenance_enabled = undef,
289292
Optional[Variant[String, Boolean]] $security_csp_frame_ancestors = undef,
290293
Boolean $security_strict_transport = true,
291294
String $lua_root = '/opt/ood/mod_ood_proxy/lib',

0 commit comments

Comments
 (0)