Initial VPS operations handbook
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: Require a working K3s kubeconfig
|
||||
ansible.builtin.stat:
|
||||
path: /etc/rancher/k3s/k3s.yaml
|
||||
register: matrix_cluster_kubeconfig
|
||||
|
||||
- name: Assert K3s is ready before creating cluster resources
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- matrix_cluster_kubeconfig.stat.exists
|
||||
fail_msg: Run k3s-server.yml successfully before matrix-cluster-base.yml.
|
||||
|
||||
- name: Install Matrix cluster base manifest
|
||||
ansible.builtin.template:
|
||||
src: base-resources.yaml.j2
|
||||
dest: /etc/rancher/k3s/matrix-cluster-base.yaml
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
|
||||
- name: Apply Matrix cluster base manifest
|
||||
ansible.builtin.command:
|
||||
argv: [k3s, kubectl, apply, -f, /etc/rancher/k3s/matrix-cluster-base.yaml]
|
||||
changed_when: false
|
||||
Reference in New Issue
Block a user