Skip to content

Commit d1c6d70

Browse files
Merge pull request #275 from Raboo/patch-1
Fix ansible_check_mode for 'Run RKE2 install script'
2 parents 8a54839 + ddf216e commit d1c6d70

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tasks/rke2.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@
209209
versions: "{{ versions_check.stdout | from_json }}"
210210

211211
- name: Run RKE2 install script
212-
when: rke2_version != installed_version
212+
when: not ansible_check_mode and rke2_version != installed_version
213213
block:
214-
- name: Run the script with airgap variables
214+
- name: Run RKE2 install script with airgap variables
215215
ansible.builtin.command:
216216
cmd: "{{ rke2_install_script_dir }}/rke2.sh"
217217
environment:
@@ -220,7 +220,7 @@
220220
INSTALL_RKE2_METHOD: "{{ rke2_method }}"
221221
changed_when: false
222222
when: rke2_airgap_mode
223-
- name: Run RKE2 script without airgap variables
223+
- name: Run RKE2 install script without airgap variables
224224
ansible.builtin.command:
225225
cmd: "{{ rke2_install_script_dir }}/rke2.sh"
226226
environment:
@@ -229,7 +229,7 @@
229229
INSTALL_RKE2_CHANNEL: "{{ rke2_channel }}"
230230
INSTALL_RKE2_METHOD: "{{ rke2_method }}"
231231
changed_when: false
232-
when: not ansible_check_mode and not rke2_airgap_mode
232+
when: not rke2_airgap_mode
233233

234234
- name: Copy Custom Manifests
235235
ansible.builtin.template:

0 commit comments

Comments
 (0)