2020-01-11 15:44:28 +01:00
|
|
|
---
|
|
|
|
|
2020-01-11 20:03:29 +01:00
|
|
|
- name: Ensure that the manifests directory exists, if required
|
2020-01-11 18:56:48 +01:00
|
|
|
file:
|
|
|
|
state: directory
|
|
|
|
path: "{{ k3s_server_manifests_dir }}"
|
|
|
|
when: k3s_server_manifests_templates | length > 0
|
|
|
|
|
2020-01-11 15:44:28 +01:00
|
|
|
# https://rancher.com/docs/k3s/latest/en/advanced/#auto-deploying-manifests
|
|
|
|
- name: Copy Auto-Deploying Manifests to Cluster
|
2020-01-11 15:10:19 +01:00
|
|
|
template:
|
|
|
|
src: "{{ item }}"
|
|
|
|
dest: "{{ k3s_server_manifests_dir }}/{{ item | basename | replace('.j2','') }}"
|
2020-01-11 20:03:58 +01:00
|
|
|
loop: "{{ k3s_server_manifests_templates }}"
|