I have this inconsistency when I declare variable pairs used in a template 
vs. variable pairs used directly in a playbook e.g:

Works in a template:
group_vars/all
  fusemq_users:

  - { 'username': 'admin', 'password': 'admin', 'role' : 'admin' }

role_name/templates/users.properties
{% for line in fusemq_users %}
{{ line.username }}={{ line.password }},{{ line.role }}
{% endfor %}


The same format, used in a play book does not work - e.g. below is not 
working:

fusemq_activemq_jmx:
  - { 'username' : 'admin', 'password' : 'admin1234' }

- name: set activemq.jmx.user
  lineinfile: dest={{ fusemq_home }}/etc/system.properties 
regexp="^#activemq.jmx.user" line="#activemq.jmx.user={{ 
fusemq_activemq_jmx.username }}"

If I remove the preceding dash, it works, e.g.
 { 'username' : 'admin', 'password' : 'admin1234' }

Is this expected?

-- 
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/c76e2823-14cc-4fcb-8e25-76613997a547%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to