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
Variables can be represented as standard YAML structures so you can assign a list value to a key like this:
--- - hosts: db vars: postgresql_ext_install_contrib: yes postgresql_pg_hba_passwd_hosts: - '10.129.181.241/32' - '1.2.3.0/8'