Skip to content

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

@anarcat

Description

@anarcat

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions