I am new to ansible. This is what I am trying to run,
on poc1 run,
client -a 8101 -h localhost 'fabric:ensemble-add -f poc2 poc3'
I want to run above command on "poc1" node passing arguments as "poc2" and
"poc3". How do I get that using hostvars or groups from inventory file.
I have tried this but It didn't work.
inventory file :
[testnodes]
poc1
poc2
poc3
YML,
---
- hosts: testnodes[0]
remote_user: test
become: yes
become_method: sudo
tasks:
- name: Add fabric Ensemble
shell: ./client -a 8101 -h localhost 'fabric:ensemble-add -f {{
groups['fusehosts'][1:] }} '
args:
chdir: /opt/jboss-fuse-6.3.0.redhat-187/bin/
--
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/399ece83-a6d2-4082-abd3-4e969027369e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.