Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add purge option for unmanaged remctl acls and configurations #20

Open
atayts opened this issue Mar 20, 2019 · 0 comments
Open

Add purge option for unmanaged remctl acls and configurations #20

atayts opened this issue Mar 20, 2019 · 0 comments

Comments

@atayts
Copy link

atayts commented Mar 20, 2019

Please add either an option or a parameter in params.pp to purge unmanaged remctl configuration and acl files:

diff --git a/modules/remctl/manifests/params.pp b/modules/remctl/manifests/params.pp
index 71acca9..fc0f039 100644
--- a/modules/remctl/manifests/params.pp
+++ b/modules/remctl/manifests/params.pp
@@ -15,6 +15,8 @@ class remctl::params {
             $client_package_name    = $server_package_name
             $krb5_keytab            = '/etc/krb5.keytab'
             $server_bin             = '/usr/sbin/remctld'
+            $purge_acls             = true
+            $purge_confs            = true
         }
 
         'Debian': {
@@ -26,6 +28,8 @@ class remctl::params {
             $client_package_name    = 'remctl-client'
             $krb5_keytab            = '/etc/krb5.keytab'
             $server_bin             = '/usr/sbin/remctld'
+            $purge_acls             = true
+            $purge_confs            = true
         }
 
         default: {
diff --git a/modules/remctl/manifests/server.pp b/modules/remctl/manifests/server.pp
index 7e6f129..c094889 100644
--- a/modules/remctl/manifests/server.pp
+++ b/modules/remctl/manifests/server.pp
@@ -14,6 +14,8 @@ class remctl::server (
     $only_from          = [ '0.0.0.0' ],
     $no_access          = [],
     $bind               = undef,
+    $purge_acls         = $remctl::params::purge_acls,
+    $purge_confs        = $remctl::params::purge_confs,
 
     $package_name       = $remctl::params::server_package_name,
 
@@ -141,19 +143,25 @@ class remctl::server (
     ->
 
     file { $remctl::params::confdir:
-        ensure => $_directories_ensure,
-        mode   => '0750',
-        owner  => $user,
-        group  => $group
+        ensure  => $_directories_ensure,
+        mode    => '0750',
+        owner   => $user,
+        group   => $group,
+        purge   => $purge_confs,
+        recurse => $purge_confs,
+        force   => $purge_confs,
     }
 
     ->
 
     file { $remctl::params::acldir:
-        ensure => $_directories_ensure,
-        mode   => '0750',
-        owner  => $user,
-        group  => $group
+        ensure  => $_directories_ensure,
+        mode    => '0750',
+        owner   => $user,
+        group   => $group,
+        purge   => $purge_acls,
+        recurse => $purge_acls,
+        force   => $purge_acls,
     }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant