Page MenuHomePhorge

No OneTemporary

Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None
diff --git a/deployments/k3s-replicated/ansible/playbook.yaml b/deployments/k3s-replicated/ansible/playbook.yaml
index eecdecd..ffb50bb 100644
--- a/deployments/k3s-replicated/ansible/playbook.yaml
+++ b/deployments/k3s-replicated/ansible/playbook.yaml
@@ -1,113 +1,115 @@
---
- name: Check local requirements
hosts: localhost
gather_facts: false
any_errors_fatal: true
tasks:
- name: Check if kubectl is available
ansible.builtin.raw: which kubectl
check_mode: false
changed_when: false
failed_when: which_res.rc > 1
register: which_res
- name: Check if kolabctl is available
ansible.builtin.shell:
cmd: env PATH="./:$PATH" which kolabctl
chdir: "{{ inventory_dir }}"
check_mode: false
changed_when: false
failed_when: which_res.rc > 1
register: which_res
- name: Set fact kolabctl_path
ansible.builtin.set_fact:
kolabctl_path: "{{ which_res.stdout }}"
- name: Assert that we found kolabctl
ansible.builtin.assert:
that: "kolabctl_path"
- name: Configure KVM
hosts: infrastructure_nodes:worker_nodes
gather_facts: false
any_errors_fatal: true
+ # Prevent issues with concurrent edits to shared lvm disks
+ serial: 1
roles:
- role: kvm
when: provision_vm | bool
tags:
- kvm
# We have to run it with serial=1, otherwise it's not executed per host
- name: Update hosts
hosts: infrastructure_nodes:worker_nodes
gather_facts: false
serial: 1
tasks:
- name: Add a host alias so we can connect to the discovered vm ip
ansible.builtin.add_host:
hostname: '{{ inventory_hostname }}'
ansible_host: '{{ vm_ip.stdout }}'
when: provision_vm | bool
- name: Setup storage
hosts: infrastructure_nodes:worker_nodes
gather_facts: true
any_errors_fatal: true
roles:
- role: ansible-role-drbd
tasks:
- name: Make filesystem on device
community.general.filesystem:
fstype: xfs
dev: "{{ item['device'] }}"
loop: "{{ disks }}"
when: disks is defined
- name: Mount device
ansible.posix.mount:
path: "{{ item['mountpoint'] }}"
src: "{{ item['device'] }}"
fstype: xfs
opts: noatime
state: mounted
loop: "{{ disks }}"
when: disks is defined
- name: Configure kolab-node
hosts: infrastructure_nodes:worker_nodes
gather_facts: false
any_errors_fatal: true
roles:
- kolab-node
- name: Fetch kubeconfig.yaml
hosts: infrastructure_nodes[0]
gather_facts: false
tasks:
- fetch:
flat: true
src: /etc/rancher/k3s/k3s.yaml
dest: "{{ resources_dir }}/kubeconfig.yaml"
- name: Deploy kolab
hosts: localhost
gather_facts: false
roles:
- role: kolab
vars:
primary_ip: "{{ hostvars[groups['infrastructure_nodes'][0]].ansible_host }}"
kubernetes_ip: "{{ virtual_ip }}"
kubeconfig: "{{ resources_dir }}/kubeconfig.yaml"
values_file: "{{ resources_dir }}/values.yaml"
label_nodes: true
reconfigure_env: >-
DB_ROOT_PASSWORD={{ db_root_password }}
DB_KOLAB_PASSWORD={{ db_kolab_password }}
DB_ROUNDCUBE_PASSWORD={{ db_rc_password }}
DB_HOST={{ virtual_ip }}
ADMIN_PASSWORD={{ admin_password }}
DOMAIN={{ domain }}
DB_MONITORING_PASSWORD={{ db_monitoring_password }}
PUBLIC_IP={{ virtual_ip }}
TEMPLATE='{{ playbook_dir }}/../values.yaml'

File Metadata

Mime Type
text/x-diff
Expires
Sat, Apr 4, 6:47 AM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18822903
Default Alt Text
(3 KB)

Event Timeline