ansible-role-k3s/tasks/build/preconfigure-k3s-auto-deploying-manifests.yml
ᗪєνιη ᗷυнʟ 82085cb80b
fix: remove run_once
2021-05-25 19:23:13 -04:00

18 lines
752 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_directory_creation | 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 the primary controller
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_directory_creation | ternary(true, false, k3s_become_for_all) }}"