mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
fix: make the roles work even when hosts are aliased in the inventory (#399)
Signed-off-by: Michal Stanke <michal@stanke.cz>
This commit is contained in:
@@ -97,7 +97,7 @@
|
||||
skip: true
|
||||
|
||||
- name: Run K3s Install [server]
|
||||
when: inventory_hostname in groups['server']
|
||||
when: inventory_hostname in groups['server'] or ansible_host in groups['server']
|
||||
ansible.builtin.command:
|
||||
cmd: /usr/local/bin/k3s-install.sh
|
||||
environment:
|
||||
@@ -106,7 +106,7 @@
|
||||
changed_when: true
|
||||
|
||||
- name: Run K3s Install [agent]
|
||||
when: inventory_hostname in groups['agent']
|
||||
when: inventory_hostname in groups['agent'] or ansible_host in groups['agent']
|
||||
ansible.builtin.command:
|
||||
cmd: /usr/local/bin/k3s-install.sh
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user