File: main.yml

package info (click to toggle)
ansible-core 2.19.0~beta6-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 32,628 kB
  • sloc: python: 180,313; cs: 4,929; sh: 4,601; xml: 34; makefile: 21
file content (24 lines) | stat: -rw-r--r-- 830 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
- name: collect the default interpreter
  respawnme:
    mode: no_respawn
  register: default_python

- name: cause a respawn
  respawnme:
    mode: respawn
  register: respawned_python

- name: cause multiple respawns (should fail)
  respawnme:
    mode: multi_respawn
  ignore_errors: true
  register: multi_respawn

- assert:
    that:
    # the respawn task should report the path of the interpreter it created, and that it's running under the new interpreter
    - respawned_python.created_interpreter == respawned_python.interpreter_path
    # ensure that the respawned interpreter is not the same as the default
    - default_python.interpreter_path != respawned_python.interpreter_path
    # multiple nested respawns should fail
    - multi_respawn is failed and multi_respawn.msg is contains 'has already been respawned'