mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2025-12-25 10:12:38 +01:00
Replace hardcoded 'master' group name with 'group_name_master' variable (#337)
For improved flexibility and maintainability. * Update tasks in node role to use 'group_name_master' variable instead of hardcoded 'master' group name * Update tasks in master role to use 'group_name_master' variable instead of hardcoded 'master' group name * Update tasks in post role to use 'group_name_master' variable instead of hardcoded 'master' group name Signed-off-by: Christian Berendt <berendt@23technologies.cloud>
This commit is contained in:
committed by
GitHub
parent
bd44a9b126
commit
215690b55b
@@ -5,7 +5,7 @@
|
||||
state: directory
|
||||
owner: "{{ ansible_user_id }}"
|
||||
mode: 0755
|
||||
with_items: "{{ groups['master'] }}"
|
||||
with_items: "{{ groups[group_name_master | default('master')] }}"
|
||||
run_once: true
|
||||
|
||||
- name: Copy metallb CRs manifest to first master
|
||||
@@ -14,14 +14,14 @@
|
||||
dest: "/tmp/k3s/metallb-crs.yaml"
|
||||
owner: "{{ ansible_user_id }}"
|
||||
mode: 0755
|
||||
with_items: "{{ groups['master'] }}"
|
||||
with_items: "{{ groups[group_name_master | default('master')] }}"
|
||||
run_once: true
|
||||
|
||||
- name: Test metallb-system namespace
|
||||
command: >-
|
||||
k3s kubectl -n metallb-system
|
||||
changed_when: false
|
||||
with_items: "{{ groups['master'] }}"
|
||||
with_items: "{{ groups[group_name_master | default('master')] }}"
|
||||
run_once: true
|
||||
|
||||
- name: Wait for MetalLB resources
|
||||
@@ -66,7 +66,7 @@
|
||||
command: >-
|
||||
k3s kubectl -n metallb-system get endpoints webhook-service
|
||||
changed_when: false
|
||||
with_items: "{{ groups['master'] }}"
|
||||
with_items: "{{ groups[group_name_master | default('master')] }}"
|
||||
run_once: true
|
||||
|
||||
- name: Apply metallb CRs
|
||||
|
||||
Reference in New Issue
Block a user