I'm trying to deploy specific Java EE EARs to a host based on what groups
that host is in.
Each EAR goes in to it's own deployable directory because we're running
each application component in it's own container.
What I have is:
- name: Copy EAR
copy:
src: "{{ maven }}/au/com/company/{{ item.1.name }}/{{ item.1.version
}}/{{ item.1.name }}-{{ item.1.version }}.ear"
dest: /opt/company/{{ item.0.name }}/deployments/{{ item.1.name }}.ear
with_subelements:
- deployables
- ears
when: item.0.name in group_names
with the variables file containing:
maven: "{{ lookup('env', 'HOME') }}/.m2/repository"
deployables:
- application: catalogue
ears:
- { name: 'catalogue-ear', version: '0.2.0-SNAPSHOT' }
which gives the error:
fatal: [local-int] => error while evaluating conditional: item.0.name in
group_names
What I had hoped would happen is if this host is in the catalogue group
then the catalogue EAR would be copied in to the specified directory.
Is the 'in' operator not supported here, or am I missing something really
obvious? Is there a better way to do this?
Thanks,
Lyle
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2d3be9d2-d694-4a8d-9acf-8f5156077c65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.