---

### tags:

- name: "Updating <pdns-admin> database on {{ inventory_hostname }}"
  include_role:
    name: postgres
    tasks_from: _update_database_state
  when:
  - database_backup_state is not defined

- name: "Creating/Restoring <pdns-admin> database backup on {{ inventory_hostname }}"
  include_role:
    name: postgres
    tasks_from: _create_database_backup.yml
  when:
  - database_backup_state is defined
  - database_backup_state in ['dump', 'restore']
