2021-05-26 09:43:07 +02:00
|
|
|
---
|
|
|
|
|
2021-05-26 09:52:34 +02:00
|
|
|
- name: Ensure that the pod-manifests directory exists
|
2021-05-26 09:43:07 +02:00
|
|
|
ansible.builtin.file:
|
|
|
|
state: directory
|
2021-05-26 09:52:34 +02:00
|
|
|
path: "{{ k3s_server_pod_manifests_dir }}"
|
2021-05-26 09:43:07 +02:00
|
|
|
mode: 0755
|
2021-05-26 09:52:34 +02:00
|
|
|
when: k3s_server_pod_manifests_templates | length > 0
|
2021-05-26 09:43:07 +02:00
|
|
|
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 }}"
|
2021-05-26 09:52:34 +02:00
|
|
|
dest: "{{ k3s_server_pod_manifests_dir }}/{{ item | basename | replace('.j2','') }}"
|
2021-05-26 09:43:07 +02:00
|
|
|
mode: 0644
|
2021-05-26 09:52:34 +02:00
|
|
|
loop: "{{ k3s_server_pod_manifests_templates }}"
|
2021-05-26 09:43:07 +02:00
|
|
|
become: "{{ k3s_become_for_directory_creation | ternary(true, false, k3s_become_for_all) }}"
|