fix: Remove bootstrap python setup from check mode
Since we can't look into the variable `pythoncheck.rc`, as it doesn't exist, we skip the `when` check for checkmode -- its installation cannot run under any circumstance in the mode anyways.
This commit is contained in:
parent
2fc23d9774
commit
66ce16ce55
1 changed files with 5 additions and 1 deletions
|
|
@ -15,7 +15,11 @@
|
|||
register: pythoncheck
|
||||
- name: install debian python
|
||||
ansible.builtin.raw: apt-get update && apt-get install python3 -y
|
||||
when: pythoncheck.rc == 127
|
||||
when: not ansible_check_mode and pythoncheck.rc == 127
|
||||
- name: pretend installing debian python for check mode
|
||||
ansible.builtin.debug:
|
||||
msg: Pretending to install python...
|
||||
when: ansible_check_mode
|
||||
|
||||
- name: Prepare incus server host
|
||||
hosts: host_system
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue