"logf_dest": [
"/logs/mx/mail.log",
"/logs/dyn.log",
"/logs/apache-servers/other.log"
]- logfile_name: remote.conf
logfile_pattern: /logs/mx/mail.log
logfile_owner: root
- logfile_name: remote.conf
logfile_pattern: /logs/dyn.log
logfile_owner: root
- logfile_name: remote.conf
logfile_pattern: /logs/apache-servers/other.log
logfile_owner: root - name: Create list of dicts
set_fact:
logfile_config: |
{
{% for k in logf_dest %}
logfile_name: remote.conf
logfile_pattern: {{ k }}
logfile_owner: root
{% endfor %}
}--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/61b38102-c346-495f-96e5-cd149800d4f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
- name: Form list of dicts
set_fact:
logfile_config: "{{ logf_dest |default([]) +
[ {
'logfile_name': 'remote.conf',
'logfile_pattern': item,
'logfile_owner': 'root'
}
] }}"
with_items: "{{ logf_dest }}"
- debug:
var: logfile_config--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/785924214264966b91e9a158e3fc236b%40olstad.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/20098621-047b-4596-b46c-8c14b37df008%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.