From 981d4ce788e9fd1f73355c53a3035e59f8d36d8a Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 24 Jul 2024 12:23:40 +0300 Subject: [PATCH] fix systemd timers --- handlers/main.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/handlers/main.yaml b/handlers/main.yaml index 2ddb054..3d34f09 100644 --- a/handlers/main.yaml +++ b/handlers/main.yaml @@ -9,9 +9,9 @@ - name: Restart backup timer systemd: name: backup.timer - enabled: yes + enabled: "{{ 'yes' if wal_g_backup_enable else 'no' }}" masked : no - state: started + state: "{{ 'started' if wal_g_backup_permanent_enable else 'stopped' }}" daemon_reload: yes when: backup_timer.changed @@ -26,9 +26,9 @@ - name: Restart backup retention timer systemd: name: backup-retention.timer - enabled: yes + enabled: "{{ 'yes' if wal_g_backup_retention_enable else 'no' }}" masked : no - state: started + state: "{{ 'started' if wal_g_backup_retention_enable else 'stopped' }}" daemon_reload: yes when: backup_retention_timer.changed @@ -43,8 +43,8 @@ - name: Restart backup permanent timer systemd: name: backup-permanent.timer - enabled: yes + enabled: "{{ 'yes' if wal_g_backup_permanent_enable else 'no' }}" masked : no - state: started + state: "{{ 'started' if wal_g_backup_permanent_enable else 'stopped' }}" daemon_reload: yes when: backup_permanent_timer.changed