Fix issue around using ip addresses in inventory, download and remove agent service properly

Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
Derek Nola
2023-11-10 15:17:13 -08:00
parent e01a8a2a8a
commit 3b9982013a
3 changed files with 21 additions and 3 deletions

View File

@@ -8,10 +8,21 @@
group: root
mode: 0755
- name: Download k3s binary
- name: Download k3s binary [server]
when: "'server' in group_names"
ansible.builtin.command:
cmd: /usr/local/bin/k3s-install.sh
environment:
INSTALL_K3S_SKIP_START: "true"
INSTALL_K3S_VERSION: "{{ k3s_version }}"
changed_when: true
- name: Download k3s binary [agent]
when: "'agent' in group_names"
ansible.builtin.command:
cmd: /usr/local/bin/k3s-install.sh
environment:
INSTALL_K3S_SKIP_START: "true"
INSTALL_K3S_VERSION: "{{ k3s_version }}"
INSTALL_K3S_EXEC: "agent"
changed_when: true