[ansible-project] Re: How to get and parse the output from target hosts

2016-09-15 Thread Jörg Kastning
Hi Alexander, you put me in the right direction. I'd like to give a short example for my solution: --- - name: show return value of command yum hosts: e-stage tasks: - name: command command: yum update-minimal --advisory RHSA-2016:1234 register: yumlog - command: reboot

[ansible-project] Re: How to get and parse the output from target hosts

2016-09-14 Thread Alexander H. Laughlin
I believe something like: - name: Reboot if packages were updated command: reboot NOW when: "'Complete!' in yumoutput" would do the trick. http://docs.ansible.com/ansible/playbooks_conditionals.html#applying-when-to-roles-and-includes