- hosts: all
  remote_user: dalibo
  become: True
  become_user: postgres
  tasks:

    - name: Copy fichiers
      copy:
        src: "82_postgresql.auto-statement.conf"
        dest: /var/lib/pgsql/17/data/postgresql.auto.conf
        owner: postgres
        mode: 0600

- hosts: all
  remote_user: dalibo
  become: True
  become_user: root
  tasks:

    - name: Restart PostgreSQL
      systemd:
        name: postgresql-17
        state: restarted