mirror of
https://github.com/PyratLabs/ansible-role-k3s.git
synced 2024-11-01 08:38:50 +01:00
19 lines
731 B
YAML
19 lines
731 B
YAML
---
|
|
|
|
- name: Ensure that the manifests directory exists
|
|
ansible.builtin.file:
|
|
state: directory
|
|
path: "{{ k3s_server_manifests_dir }}"
|
|
mode: 0755
|
|
when: k3s_server_manifests_templates | length > 0
|
|
become: "{{ k3s_become_for_manifests_dir | ternary(true, false, k3s_become_for_all) }}"
|
|
|
|
# https://rancher.com/docs/k3s/latest/en/advanced/#auto-deploying-manifests
|
|
- name: Ensure Auto-Deploying Manifests are copied to controllers
|
|
ansible.builtin.template:
|
|
src: "{{ item }}"
|
|
dest: "{{ k3s_server_manifests_dir }}/{{ item | basename | replace('.j2','') }}"
|
|
mode: 0644
|
|
loop: "{{ k3s_server_manifests_templates }}"
|
|
become: "{{ k3s_become_for_manifests_dir | ternary(true, false, k3s_become_for_all) }}"
|