Created
December 11, 2014 14:03
-
-
Save hughsaunders/321bbf1b9301c75164b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ansible-playbook -i inventory test.yml | |
PLAY [localhost] ************************************************************** | |
TASK: [shell cat /tmp/{{item}}] *********************************************** | |
failed: [localhost] => (item=nonexistant) => {"attempts": 3, "changed": true, "cmd": "cat /tmp/nonexistant", "delta": "0:00:00.013548", "end": "2014-12-11 14:01:09.573189", "failed": true, "item": "nonexistant", "rc": 1, "start": "2014-12-11 14:01:09.559641"} | |
stderr: cat: /tmp/nonexistant: No such file or directory | |
msg: Task failed as maximum retries was encountered | |
changed: [localhost] => (item=exists) | |
changed: [localhost] => (item=exists) | |
FATAL: all hosts have already failed -- aborting | |
PLAY RECAP ******************************************************************** | |
to retry, use: --limit @/home/hugh/test.retry | |
localhost : ok=0 changed=0 unreachable=0 failed=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---$ | |
- hosts: localhost$ | |
gather_facts: False$ | |
tasks:$ | |
- shell:$ | |
cat /tmp/{{item}}$ | |
with_items:$ | |
- "nonexistant"$ | |
- "exists"$ | |
- "exists"$ | |
register: shell_result$ | |
until: shell_result|success$ | |
ignore_errors: False$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment