example of exponential backup (#72617)
This commit is contained in:
parent
85570e2dc0
commit
452bc3af04
1 changed files with 13 additions and 0 deletions
|
@ -25,6 +25,19 @@ Most programming languages have loops (``for``, ``while``, and so on) and list c
|
|||
- selectattr/rejectattr: very similar to the above but it uses a specific attribute of the list elements for the conditional statement.
|
||||
|
||||
|
||||
.. _exponential_backoff:
|
||||
|
||||
Use a loop to create exponential backoff for retries/until.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
- name: retry ping 10 times with exponential backup delay
|
||||
ping:
|
||||
retries: 10
|
||||
delay: '{{item|int}}'
|
||||
loop: '{{ range(1, 10)|map('pow', 2) }}'
|
||||
|
||||
|
||||
.. _keys_from_dict_matching_list:
|
||||
|
||||
Extract keys from a dictionary matching elements from a list
|
||||
|
|
Loading…
Reference in a new issue