Debian Codegraph @

test/integration/targets/register_projections/tasks/keywords/until.yml

raw
1 - name: Use register projections in 'until' without a loop
2 debug:
3 retries: 3
4 delay: 0
5 until: until_rp
6 register:
7 until_rp: _task.result.attempts == until_rp_expected
8 until_rp_expected: 1 + 1
9 until_rp_result: _task.result
10
11 - name: Verify results
12 assert:
13 that:
14 - until_rp_result.attempts == 2
15
16 - name: Use register projections in 'until' with a loop
17 debug:
18 retries: 3
19 delay: 0
20 until: until_loop_rp
21 loop: [1, 2, 3]
22 register:
23 until_loop_rp: _task.result.attempts == until_loop_rp_expected
24 until_loop_rp_expected: _task.loop_result.results | length
25 until_loop_rp_results: _task.loop_result.results
26
27 - name: Verify results
28 assert:
29 that:
30 - until_loop_rp_results | length == 3
31 - until_loop_rp_results[0].attempts == 1
32 - until_loop_rp_results[1].attempts == 2
33 - until_loop_rp_results[2].attempts == 3