Skip to content

Commit

Permalink
Added configuration to enable/disable maintenance with Puppet (#170)
Browse files Browse the repository at this point in the history
* Added configuration to enable/disable maintenance with Puppet

* Fixed formatting in maintenance.enable file resource

* Remove undef check for maintenance_enabled
  • Loading branch information
abujeda authored Jan 21, 2025
1 parent 0ba762d commit 5fe1c09
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,19 @@
mode => '0755',
}

if $openondemand::maintenance_enabled {
$maintenance_enable_ensure = 'file'
} else {
$maintenance_enable_ensure = 'absent'
}

file { '/etc/ood/maintenance.enable':
ensure => $maintenance_enable_ensure,
owner => 'root',
group => 'root',
mode => '0644',
}

file { '/etc/ood/config':
ensure => 'directory',
owner => 'root',
Expand Down
3 changes: 3 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
# Source for maintenance index.html
# @param maintenance_content
# Content for maintenance index.html
# @param maintenance_enabled
# Enable maintenance mode in OOD
# @param security_csp_frame_ancestors
# ood_portal.yml security_csp_frame_ancestors
# @param security_strict_transport
Expand Down Expand Up @@ -286,6 +288,7 @@
Array $maintenance_ip_allowlist = [],
Optional[String] $maintenance_source = undef,
Optional[String] $maintenance_content = undef,
Optional[Boolean] $maintenance_enabled = undef,
Optional[Variant[String, Boolean]] $security_csp_frame_ancestors = undef,
Boolean $security_strict_transport = true,
String $lua_root = '/opt/ood/mod_ood_proxy/lib',
Expand Down

0 comments on commit 5fe1c09

Please sign in to comment.