mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2025-12-25 18:23:05 +01:00
fix(ansible): Install services separate from config (#63)
This commit is contained in:
@@ -40,6 +40,25 @@
|
||||
mode: 0644
|
||||
when: ansible_host == hostvars[groups['master'][0]]['ansible_host'] | default(groups['master'][0])
|
||||
|
||||
# these will be copied and installed now, then tested later and apply config
|
||||
- name: Copy metallb namespace to first master
|
||||
template:
|
||||
src: "metallb.namespace.j2"
|
||||
dest: "/var/lib/rancher/k3s/server/manifests/metallb-namespace.yaml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when: ansible_host == hostvars[groups['master'][0]]['ansible_host'] | default(groups['master'][0])
|
||||
|
||||
- name: Copy metallb namespace to first master
|
||||
template:
|
||||
src: "metallb.crds.j2"
|
||||
dest: "/var/lib/rancher/k3s/server/manifests/metallb-crds.yaml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when: ansible_host == hostvars[groups['master'][0]]['ansible_host'] | default(groups['master'][0])
|
||||
|
||||
- name: Init cluster inside the transient k3s-init service
|
||||
command:
|
||||
cmd: "systemd-run -p RestartSec=2 \
|
||||
|
||||
1875
roles/k3s/master/templates/metallb.crds.j2
Normal file
1875
roles/k3s/master/templates/metallb.crds.j2
Normal file
File diff suppressed because it is too large
Load Diff
7
roles/k3s/master/templates/metallb.namespace.j2
Normal file
7
roles/k3s/master/templates/metallb.namespace.j2
Normal file
@@ -0,0 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: metallb-system
|
||||
labels:
|
||||
app: metallb
|
||||
|
||||
Reference in New Issue
Block a user