2021-05-27 00:07:22 +02:00
|
|
|
---
|
|
|
|
|
2021-05-27 17:58:45 +02:00
|
|
|
- name: Ensure that the pod-manifests directory exists
|
2021-05-27 00:07:22 +02:00
|
|
|
ansible.builtin.file:
|
|
|
|
state: directory
|
2021-05-27 17:57:42 +02:00
|
|
|
path: "{{ k3s_server_pod_manifests_dir }}"
|
2021-05-27 00:07:22 +02:00
|
|
|
mode: 0755
|
|
|
|
when: k3s_server_pod_manifests_urls | 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 downloaded to the primary controller
|
|
|
|
ansible.builtin.get_url:
|
|
|
|
url: "{{ item.url }}"
|
2021-05-27 17:57:42 +02:00
|
|
|
dest: "{{ k3s_server_pod_manifests_dir }}/{{ item.filename }}"
|
2021-05-27 00:07:22 +02:00
|
|
|
mode: 0644
|
|
|
|
loop: "{{ k3s_server_pod_manifests_urls }}"
|
|
|
|
become: "{{ k3s_become_for_directory_creation | ternary(true, false, k3s_become_for_all) }}"
|