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

backup cron job should be purged if backup_cron_enable is false #374

Open
anarcat opened this issue Jan 11, 2021 · 0 comments
Open

backup cron job should be purged if backup_cron_enable is false #374

anarcat opened this issue Jan 11, 2021 · 0 comments

Comments

@anarcat
Copy link

anarcat commented Jan 11, 2021

when i disable the cron job with backup_cron_enable => false in the main class, the cron resource doesn't get purged. it seems to me this should be fixed... maybe with:

modified   manifests/backup.pp
@@ -14,11 +14,10 @@ class gitlab::backup {
     $backup_cron_skips = "SKIP=${_backup_cron_skips}"
   }
 
-  if $backup_cron_enable {
-    cron {'gitlab backup':
-      command => "${rake_exec} gitlab:backup:create CRON=1 ${backup_cron_skips}",
-      hour    => $backup_cron_hour,
-      minute  => $backup_cron_minute,
-    }
+  cron {'gitlab backup':
+    ensure  => $backup_cron_enable,
+    command => "${rake_exec} gitlab:backup:create CRON=1 ${backup_cron_skips}",
+    hour    => $backup_cron_hour,
+    minute  => $backup_cron_minute,
   }
 }

... untested.

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