Debian Codegraph @

test/integration/targets/module_utils_common.respawn/tasks/main.yml

raw
1 - name: collect the default interpreter
2 respawnme:
3 mode: no_respawn
4 register: default_python
5
6 - name: cause a respawn
7 respawnme:
8 mode: respawn
9 register: respawned_python
10
11 - name: cause multiple respawns (should fail)
12 respawnme:
13 mode: multi_respawn
14 ignore_errors: true
15 register: multi_respawn
16
17 - assert:
18 that:
19 # the respawn task should report the path of the interpreter it created, and that it's running under the new interpreter
20 - respawned_python.created_interpreter == respawned_python.interpreter_path
21 # ensure that the respawned interpreter is not the same as the default
22 - default_python.interpreter_path != respawned_python.interpreter_path
23 # multiple nested respawns should fail
24 - multi_respawn is failed and multi_respawn.msg is contains 'has already been respawned'