Commit 789632a5 by Feanil Patel

`retries` don't work without `until`

The `retries` statement is just ignored unless an `until` clause
is provided.

https://github.com/ansible/ansible/issues/20802
parent 001c6291
......@@ -66,6 +66,10 @@
ttl: 300
record: "{{ dns_name }}.{{ dns_zone }}"
value: "{{ item.public_dns_name }}"
register: task_result
until: task_result|succeeded
retries: 5
delay: 30
with_items: "{{ ec2.instances }}"
- name: Add DNS names for services
......@@ -78,6 +82,10 @@
ttl: 300
record: "{{ item[1] }}-{{ dns_name }}.{{ dns_zone }}"
value: "{{ item[0].public_dns_name }}"
register: task_result
until: task_result|succeeded
retries: 5
delay: 30
with_nested:
- "{{ ec2.instances }}"
- ['studio', 'ecommerce', 'preview', 'discovery', 'credentials']
......
......@@ -37,6 +37,7 @@
dest: "/tmp/{{ SPLUNKFORWARDER_DEB }}"
url: "{{ SPLUNKFORWARDER_PACKAGE_URL }}"
register: download_deb
until: download_deb|succeeded
retries: 5
- name: Install splunk forwarder
......
......@@ -128,8 +128,9 @@
# We don't care if absent users lack ssh keys
when: item.get('state', 'present') == 'present' and item.github is defined
with_items: "{{ user_info }}"
retries: 5
register: github_users_return
until: github_users_return|succeeded
retries: 5
- name: Print warning if github user(s) missing ssh key
debug:
......@@ -151,6 +152,8 @@
exclusive: yes
key: "https://github.com/{{ item.name }}.keys"
when: item.github is defined and item.get('state', 'present') == 'present'
register: task_result
until: task_result|succeeded
retries: 5
with_items: "{{ user_info }}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment