Re: [ansible-project] With_items over the loops with "when", can we write multiple "when" in one task?

2017-05-19 Thread Raj Martha
HI Coca, some reason the play skipping even though there is a "started" word in allcluster_status.stdout, can you please give me exact "when" this is what i have - name: "Starting Messaging clusters " shell: "{{ was_home }}bin/wsadmin.sh -lang jython -username {{ dmgr_username

Re: [SOCIAL NETWORK] [ansible-project] With_items over the loops with "when", can we write multiple "when" in one task?

2017-05-18 Thread Werner Flamme
Raj Martha [15.05.2017 16:40]: > - > debug: var=allcluster_status.stdout_lines > - > name: " Starting the clusters which is stopped" > shell: "{{ script to start cluster}] {{item.cluster1}} the {{ do not match the }] here! -- -- You received this message because y

Re: [ansible-project] With_items over the loops with "when", can we write multiple "when" in one task?

2017-05-17 Thread Brian Coca
The 'when' is executed PER item from with_, so you do have that, but written in single keyword, you cannot do multiple keywords. when: '"%s started" % item.key in allcluster_status.stdout' with_dict: cluster1: cluster1 name cluster2: cluster2 name -- Brian Coca -- You re

Re: [ansible-project] With_items over the loops with "when", can we write multiple "when" in one task?

2017-05-17 Thread Kai Stian Olstad
On 15. mai 2017 16:40, Raj Martha wrote: Hi all, I want to write the code like this, is it possible? or is there any better way to write? Why don't you try to see if it works? --- - become: true become_user: wsadmin hosts: ATST-ESBDMGR tasks: - ping: ~ - name: "Dis

[ansible-project] With_items over the loops with "when", can we write multiple "when" in one task?

2017-05-15 Thread Raj Martha
Hi all, I want to write the code like this, is it possible? or is there any better way to write? --- - become: true become_user: wsadmin hosts: ATST-ESBDMGR tasks: - ping: ~ - name: "Displaying Hostname for DMGR Profile Server" register: hostnamefordmgr shel