ansible-role-k3s/tasks/build/preconfigure-k3s-static-pod-manifests.yml
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs da7d8c67d9
Rename vars, path
Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
2021-05-26 09:52:34 +02:00

18 lines
723 B
YAML

---
- name: Ensure that the pod-manifests directory exists
ansible.builtin.file:
state: directory
path: "{{ k3s_server_pod_manifests_dir }}"
mode: 0755
when: k3s_server_pod_manifests_templates | length > 0
become: "{{ k3s_become_for_directory_creation | ternary(true, false, k3s_become_for_all) }}"
# https://github.com/k3s-io/k3s/pull/1691
- name: Ensure static pod manifests are copied to controllers
ansible.builtin.template:
src: "{{ item }}"
dest: "{{ k3s_server_pod_manifests_dir }}/{{ item | basename | replace('.j2','') }}"
mode: 0644
loop: "{{ k3s_server_pod_manifests_templates }}"
become: "{{ k3s_become_for_directory_creation | ternary(true, false, k3s_become_for_all) }}"