Don't modify existing airgap k3s-install script (#372)

* Check for existing k3s install script during airgap deployment

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Update vagrant file to newer OS

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
Derek Nola
2024-10-18 09:33:01 -07:00
committed by GitHub
parent 99fa632acb
commit c82a2f9b8e
2 changed files with 13 additions and 2 deletions

View File

@@ -8,9 +8,18 @@
that: "ansible_version.full is version_compare('2.12', '>=')"
msg: "The Airgap role requires at least ansible-core 2.12"
- name: Check for existing install script
become: false
delegate_to: localhost
ansible.builtin.stat:
path: "{{ airgap_dir + '/k3s-install.sh' }}"
register: host_install_script
- name: Download k3s install script
become: false
delegate_to: localhost
# Workaround for https://github.com/ansible/ansible/issues/64016
when: not host_install_script.stat.exists
ansible.builtin.get_url:
url: https://get.k3s.io/
timeout: 120