Hi, Without quotes I get the same error without quotes...
- name: Vhosts apache config template: src=apache_vhost.j2 dest=/etc/apache2/sites-available/{{ item.domain }}.conf with_items: apache.vhosts when: ansible_os_family == 'Debian' and item.state == 'availible' tags: - apache notify: - reload apache2 Am Donnerstag, 7. Mai 2015 16:22:00 UTC+2 schrieb Brian Coca: > > yes, when runs after with_ and can use the item variable, your problem > is with quoting, not the items. > > when: ansible_os_family == 'Debian' and item.state == 'available' > > The when is always templated (implicit {{ }} around it), if you quote > the whole thing it will get looked at as a string. > > > -- > Brian Coca > -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ac38c9ce-fe99-43a2-891f-725f8b3baf7d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.