wal-g-pg/handlers/main.yaml
2024-07-30 21:51:02 +03:00

51 lines
1.4 KiB
YAML

- name: Daemon reload backup service
systemd:
name: backup.service
enabled: no
masked : no
daemon_reload: yes
when: backup_service.changed
- name: Restart backup timer
systemd:
name: backup.timer
enabled: "{{ 'yes' if wal_g_backup_enable else 'no' }}"
masked : no
state: "{{ 'started' if wal_g_backup_enable else 'stopped' }}"
daemon_reload: yes
when: backup_timer.changed
- name: Daemon reload backup retention service
systemd:
name: backup-retention.service
enabled: no
masked : no
daemon_reload: yes
when: backup_retention_service.changed
- name: Restart backup retention timer
systemd:
name: backup-retention.timer
enabled: "{{ 'yes' if wal_g_backup_retention_enable else 'no' }}"
masked : no
state: "{{ 'started' if wal_g_backup_retention_enable else 'stopped' }}"
daemon_reload: yes
when: backup_retention_timer.changed
- name: Daemon reload backup permanent service
systemd:
name: backup-permanent.service
enabled: no
masked : no
daemon_reload: yes
when: backup_permanent_service.changed
- name: Restart backup permanent timer
systemd:
name: backup-permanent.timer
enabled: "{{ 'yes' if wal_g_backup_permanent_enable else 'no' }}"
masked : no
state: "{{ 'started' if wal_g_backup_permanent_enable else 'stopped' }}"
daemon_reload: yes
when: backup_permanent_timer.changed