mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2026-03-09 12:02:11 +01:00
Provide configurable server/agent group names for airgap role (#497)
Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
3
roles/airgap/defaults/main.yml
Normal file
3
roles/airgap/defaults/main.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
server_group: server # noqa var-naming[no-role-prefix]
|
||||||
|
agent_group: agent # noqa var-naming[no-role-prefix]
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
- name: Install Airgap K3s
|
- name: Install Airgap K3s
|
||||||
block:
|
block:
|
||||||
- name: Run K3s Install [server]
|
- name: Run K3s Install [server]
|
||||||
when: inventory_hostname in groups['server'] or ansible_host in groups['server']
|
when: inventory_hostname in groups[server_group] or ansible_host in groups[server_group]
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: /usr/local/bin/k3s-install.sh
|
cmd: /usr/local/bin/k3s-install.sh
|
||||||
environment:
|
environment:
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
changed_when: true
|
changed_when: true
|
||||||
|
|
||||||
- name: Run K3s Install [agent]
|
- name: Run K3s Install [agent]
|
||||||
when: inventory_hostname in groups['agent'] or ansible_host in groups['agent']
|
when: inventory_hostname in groups[agent_group] or ansible_host in groups[agent_group]
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: /usr/local/bin/k3s-install.sh
|
cmd: /usr/local/bin/k3s-install.sh
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
Reference in New Issue
Block a user