ansible-role-k3s/tasks/build/preconfigure-k3s-auto-deploying-manifests-urls.yml

19 lines
727 B
YAML
Raw Normal View History

---
- name: Ensure that the manifests directory exists
ansible.builtin.file:
state: directory
path: "{{ k3s_server_manifests_dir }}"
mode: 0755
when: k3s_server_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 }}"
dest: "{{ k3s_server_manifests_dir }}/{{ item.filename }}"
mode: 0644
loop: "{{ k3s_server_manifests_urls }}"
become: "{{ k3s_become_for_directory_creation | ternary(true, false, k3s_become_for_all) }}"