Skip to content

Instantly share code, notes, and snippets.

@manicminer
Created February 28, 2016 10:43
Show Gist options
  • Save manicminer/a4f7070c5ebe3320319c to your computer and use it in GitHub Desktop.
Save manicminer/a4f7070c5ebe3320319c to your computer and use it in GitHub Desktop.
---
- block:
- name: Retrieve some information
stat:
path: /path/to/a/file
register: info_result
- name: Check a condition
assert:
that: info_result.stat.exists
ignore_errors: yes
register: cond_check
- name: Wait for manual intervention
pause:
prompt: "Please create the configuration file"
when: cond_check | failed
until: cond_check | success
retries: 5
ERROR! 'retries' is not a valid attribute for a Block
The error appears to have been in '/home/tom/tmp/ansible/block-retry.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- block:
^ here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment