-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do Until "attempts" key is missing #17258
Comments
The reported problem come from line 261 in /usr/lib/python2.7/dist-packages/ansible/plugins/callback/default.py. If you change this line to: msg = "FAILED - RETRYING: %s (%d retries left, %d attempts done)." % (result._task, result._result['retries'] - result._result['attempts'], result._result['attempts']) The output will be like: PLAYBOOK: ansible-bug.play ***************************************************** PLAY [all] ********************************************************************* TASK [setup] ******************************************************************* TASK [lineinfile] ************************************************************** TASK [debug] ******************************************************************* PLAY RECAP ********************************************************************* |
In testing this on the most recent devel/stable-2.1, I actually see quite a different result: [jamesc@jimi testing]$ ansible-playbook -vvv 17258.yml Using /etc/ansible/ansible.cfg as config file PLAYBOOK: 17258.yml ************************************************************ 1 plays in 17258.yml PLAY [localhost] *************************************************************** TASK [lineinfile] ************************************************************** task path: /home/jamesc/testing/17258.yml:4 Using module file /data/devel/ansible/lib/ansible/modules/core/files/lineinfile.py <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: jamesc <127.0.0.1> EXEC /bin/sh -c '/usr/bin/python && sleep 0' fatal: [localhost]: FAILED! => { "failed": true, "msg": "The conditional check 'not result.changed' failed. The error was: error while evaluating conditional (not result.changed): 'dict object' has no attribute 'changed'" } PLAY RECAP ********************************************************************* localhost : ok=0 changed=0 unreachable=0 failed=1 |
Closing This TicketHi! We believe the above commit should resolve this problem for you. This will also be included in the next release. If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved. Thank you! |
ISSUE TYPE
COMPONENT NAME
Loops
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
Do Until documentation says:
But the attempts key is missing
STEPS TO REPRODUCE
The text was updated successfully, but these errors were encountered: