[ansible-project] Re: How to get item by item from the item.stdout so you can execute a command for each item on the item.stdout.

2017-09-08 Thread Carlos María Cornejo Crespo
Hi folks, Just in case this help someone else out - name: Retrieve existing vm's vars: _vm_iaas_username: "{{ [vm_iaas_username, data.vm_iaas_username, 'oneadmin']|reject('undefined')| first }}" shell: "onevm list | grep {{ _vm_iaas_username }} | awk 'BEGIN {FS=\" \"}{print $1}'" regi

[ansible-project] Re: How to get item by item from the item.stdout so you can execute a command for each item on the item.stdout.

2016-01-21 Thread santosh reddy
Hi Esteban, Were you able to find a solution for this, even i'm having the same problem. I'm using ansible 2.0.0.2 but couldn't find a solution to this. Thanks, Santosh On Wednesday, 8 July 2015 20:01:46 UTC+5:30, Esteban Freire wrote: > > Hi Tom, all > > I had a typo on my main tas

[ansible-project] Re: How to get item by item from the item.stdout so you can execute a command for each item on the item.stdout.

2015-07-08 Thread Esteban Freire
Hi Tom, all I had a typo on my main task but anyway, I don't get to manage to do this yet. If I tried it as in the link provided by you, I get the following issue: with_items: "{{VMIDs_per_user.stdout_lines}}" TASK: [ON4_project_managment | Delete the VMs running under the user] *

[ansible-project] Re: How to get item by item from the item.stdout so you can execute a command for each item on the item.stdout.

2015-07-07 Thread Esteban Freire
This is what I tried yesterday: https://docs.ansible.com/playbooks_conditionals.html El martes, 7 de julio de 2015, 9:31:29 (UTC+2), Esteban Freire escribió: > > Hi Tom, > > Thanks a lot for your answer :) > > I already tried this yesterday but it is not working for me. Probably, I > am not unde

[ansible-project] Re: How to get item by item from the item.stdout so you can execute a command for each item on the item.stdout.

2015-07-07 Thread Esteban Freire
Hi Tom, Thanks a lot for your answer :) I already tried this yesterday but it is not working for me. Probably, I am not understanding it correctly. This is what I tried: First, I tried this task: - name: Getting the IDs for the VMs running under the user sudo: True sudo_user: oneadmin shell

[ansible-project] Re: How to get item by item from the item.stdout so you can execute a command for each item on the item.stdout.

2015-07-06 Thread Tom Paine
https://docs.ansible.com/playbooks_loops.html#iterating-over-the-results-of-a-program-execution -- 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-projec