How to assign an array to a variable in an Ansible-Playbook

前端 未结 5 786
南方客
南方客 2020-12-23 14:49

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         


        
5条回答
  •  情书的邮戳
    2020-12-23 15:14

    To add '/32' to the address, you can use the Ansible ipaddr filter (converting to CIDR notation).

    {{ ip_addresses|ipaddr('host') }}
    

提交回复
热议问题