In a playbook I got the following code:
--- - hosts: db vars: postgresql_ext_install_contrib: yes postgresql_pg_hba_passwd_hosts: [\'10.129.181.241
To add '/32' to the address, you can use the Ansible ipaddr filter (converting to CIDR notation).
{{ ip_addresses|ipaddr('host') }}