mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
Fix linting to bring back 'production' status for all non-server k3s roles
Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
@@ -13,13 +13,13 @@
|
||||
delegate_to: localhost
|
||||
ansible.builtin.stat:
|
||||
path: "{{ airgap_dir + '/k3s-install.sh' }}"
|
||||
register: host_install_script
|
||||
register: airgap_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
|
||||
when: not airgap_host_install_script.stat.exists
|
||||
ansible.builtin.get_url:
|
||||
url: https://get.k3s.io/
|
||||
timeout: 120
|
||||
@@ -34,11 +34,11 @@
|
||||
group: root
|
||||
mode: "0755"
|
||||
|
||||
- name: Determine architecture and set k3s_arch
|
||||
- name: Determine architecture and set airgap_k3s_arch
|
||||
ansible.builtin.set_fact:
|
||||
k3s_arch: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'arm' if ansible_architecture == 'armv7l' else 'amd64' }}"
|
||||
airgap_k3s_arch: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'arm' if ansible_architecture == 'armv7l' else 'amd64' }}"
|
||||
|
||||
- name: Distribute K3s binary {{ k3s_arch }}
|
||||
- name: Distribute K3s binary {{ airgap_k3s_arch }}
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item }}"
|
||||
dest: /usr/local/bin/k3s
|
||||
@@ -47,7 +47,7 @@
|
||||
mode: "0755"
|
||||
with_first_found:
|
||||
- files:
|
||||
- "{{ airgap_dir }}/k3s-{{ k3s_arch }}"
|
||||
- "{{ airgap_dir }}/k3s-{{ airgap_k3s_arch }}"
|
||||
- "{{ airgap_dir }}/k3s"
|
||||
# with_first_found always runs, even inside the when block
|
||||
# so we need to skip it if the file is not found
|
||||
@@ -62,15 +62,15 @@
|
||||
mode: "0755"
|
||||
with_fileglob:
|
||||
- "{{ airgap_dir }}/k3s-selinux*.rpm"
|
||||
register: selinux_copy
|
||||
register: airgap_selinux_copy
|
||||
ignore_errors: true
|
||||
|
||||
- name: Install K3s SELinux RPM
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- selinux_copy.skipped is false
|
||||
- airgap_selinux_copy.skipped is false
|
||||
ansible.builtin.dnf:
|
||||
name: "{{ selinux_copy.results[0].dest }}"
|
||||
name: "{{ airgap_selinux_copy.results[0].dest }}"
|
||||
state: present
|
||||
disable_gpg_check: true
|
||||
disablerepo: "*"
|
||||
|
||||
Reference in New Issue
Block a user