Utiliser le module Ansible postgresql-pg-hba
Au lieu de:
- name: autorisation dans pg_hba.conf
lineinfile:
path: "{{ path_to_icat }}/pg_hba.conf"
insertbefore: '^# Allow replication connections from localhost'
line: 'host {{ database_name }} {{ database_user }} {{ irods_server }}/24 trust'
#backrefs: yes
backup: yes