Skip to content

Commit f86a57c

Browse files
Merge pull request #350 from lablabs/fix/ansible_19_support
Fixes Ansible 2.19 support
2 parents 9c8f5a7 + 1aca951 commit f86a57c

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ rke2_etcd_snapshot_source_dir: etcd_snapshots
241241
# The etcd will be restored only during the initial run, so even if you will leave the the file name specified,
242242
# the etcd will remain untouched during the next runs.
243243
# You can either use this or set options in `rke2_etcd_snapshot_s3_options`
244-
rke2_etcd_snapshot_file:
244+
rke2_etcd_snapshot_file: ""
245245

246246
# Etcd snapshot location
247247
rke2_etcd_snapshot_destination_dir: "{{ rke2_data_path }}/server/db/snapshots"
@@ -346,7 +346,6 @@ rke2_wait_for_all_pods_to_be_healthy: false
346346
# The args passed to the kubectl wait command
347347
rke2_wait_for_all_pods_to_be_healthy_args: --for=condition=Ready -A --all pod --field-selector=metadata.namespace!=kube-system,status.phase!=Succeeded
348348

349-
350349
# Enable debug mode (rke2-service)
351350
rke2_debug: false
352351

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ rke2_etcd_snapshot_source_dir: etcd_snapshots
202202
# The etcd will be restored only during the initial run, so even if you will leave the the file name specified,
203203
# the etcd will remain untouched during the next runs.
204204
# You can either use this or set options in `rke2_etcd_snapshot_s3_options`
205-
rke2_etcd_snapshot_file:
205+
rke2_etcd_snapshot_file: ""
206206

207207
# Etcd snapshot location
208208
rke2_etcd_snapshot_destination_dir: "{{ rke2_data_path }}/server/db/snapshots"

meta/argument_specs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ argument_specs:
307307

308308
rke2_etcd_snapshot_file:
309309
type: str
310-
required: false
310+
default: ""
311311
description: "Etcd snapshot file name. When the file name is defined, the etcd will be restored on initial deployment Ansible run."
312312

313313
rke2_etcd_snapshot_destination_dir:

tasks/first_server.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@
4444
- name: Register if we need to do a etcd restore from file
4545
ansible.builtin.set_fact:
4646
do_etcd_restore: true
47-
when: rke2_etcd_snapshot_file and ((ansible_facts.services['rke2-server.service'] is not defined) or (ansible_facts.services['rke2-server.service']['status'] == 'disabled'))
47+
when: (rke2_etcd_snapshot_file | length > 0) and ((ansible_facts.services['rke2-server.service'] is not defined) or (ansible_facts.services['rke2-server.service']['status'] == 'disabled'))
4848

4949
- name: Register if we need to do a etcd restore from s3
5050
ansible.builtin.set_fact:
5151
do_etcd_restore_from_s3: true
5252
when:
53-
- not rke2_etcd_snapshot_file
53+
- rke2_etcd_snapshot_file | length > 0
5454
- rke2_etcd_snapshot_s3_options is defined
5555
- rke2_etcd_snapshot_s3_options.access_key
5656
- rke2_etcd_snapshot_s3_options.secret_key

0 commit comments

Comments
 (0)