- name: Template systemd backup permanent timer template: src: backup-permanent.timer.j2 dest: /etc/systemd/system/backup-permanent.timer notify: Restart backup permanent timer register: backup_permanent_timer - name: Enable and start systemd 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