Ansible version is ansible-2.1.1.0-1 On Friday, November 18, 2016 at 6:22:05 PM UTC+5:30, [email protected] wrote: > > Any idea about the below error - > > [sysadm@pclprdftsnsoft1 ~]$ ansible-playbook 2.yml > [WARNING]: While constructing a mapping from /home/sysadm/2.yml, line 14, > column 6, found a duplicate dict key > (shell). Using last defined value only. > > > PLAY [patch] > ******************************************************************* > > TASK [setup] > ******************************************************************* > ok: [ccltstftsmrk1] > > TASK [I am rebooting servers!! You go and have some coffe!] > ******************** > fatal: [ccltstftsmrk1]: FAILED! => {"changed": true, "cmd": "sh -c > '/usr/bin/reboot'", "delta": "0:00:00.015728", "end": "2016-11-18 > 06:33:54.544235", "failed": true, "rc": 1, "start": "2016-11-18 > 06:33:54.528507", "stderr": "reboot: Need to be root", "stdout": "", > "stdout_lines": [], "warnings": []} > ...ignoring > > TASK [I am waiting for server to come back!] > *********************************** > ok: [ccltstftsmrk1 -> localhost] > > TASK [Subscribing a new channel] > *********************************************** > fatal: [ccltstftsmrk1]: FAILED! => {"changed": true, "cmd": "sh -c > \"rhnreg_ks --activationkey 1-vblock20161026 --force\"", "delta": > "0:00:00.006615", "end": "2016-11-18 06:36:31.115522", "failed": true, > "rc": 127, "start": "2016-11-18 06:36:31.108907", "stderr": "sh: rhnreg_ks: > command not found", "stdout": "", "stdout_lines": [], "warnings": []} > > NO MORE HOSTS LEFT > ************************************************************* > [WARNING]: Could not create retry file '2.retry'. [Errno 2] No > such file or directory: '' > > > PLAY RECAP > ********************************************************************* > ccltstftsmrk1 : ok=3 changed=0 unreachable=0 failed=1 > > [sysadm@pclprdftsnsoft1 ~]$ > > > code - > > [sysadm@pclprdftsnsoft1 ~]$ cat 2.yml > --- > - hosts: patch > tasks: > - name: I am rebooting servers!! You go and have some coffe! > shell: sh -c '/usr/bin/reboot' > async: 0 > poll: 0 > ignore_errors: true > > - name: I am waiting for server to come back! > local_action: wait_for host={{ inventory_hostname }} port=22 > state=started delay=150 timeout=500 > become: no > > - name: Subscribing a new channel > shell: sh -c "rhnreg_ks --activationkey 1-vblock20161026" > shell: sh -c "rhnreg_ks --activationkey 1-vblock20161026 --force" > > - name: Updating patches > shell: sh -c "sudo yum update -y" > > >
-- 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/63305f6c-29a2-4a9a-972d-3d1a8b5772cb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
