You have a list of ansible dictionaries:
domains:
- { domain: example.com, cert: cert1.pem }
- { domain: example.in, cert: cert2.pem }
how do you produce joined array list in a jinja2 template from domains only?
domains=example.com,example.in
domains={{ domains | map(attribute='domain') | list | join(",") }}
Ansible: filter a list by its attributes
https://github.com/ansible/ansible/issues/24338
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With