diff --git a/README.md b/README.md index 9b1f828..41a5f2e 100644 --- a/README.md +++ b/README.md @@ -338,7 +338,7 @@ to `true`. #### Important note about `k3s_server_manifests_urls` and `k3s_server_pod_manifests_urls` To deploy server manifests and server pod manifests from URL, you need to -specify a `url` and a `filename`. Below is an example of how to deploy the +specify a `url` and optionally a `filename` (if none provided basename is used). Below is an example of how to deploy the Tigera operator for Calico and kube-vip. ```yaml diff --git a/tasks/ensure_k3s_auto_deploy.yml b/tasks/ensure_k3s_auto_deploy.yml index 842d8ce..32cfbac 100644 --- a/tasks/ensure_k3s_auto_deploy.yml +++ b/tasks/ensure_k3s_auto_deploy.yml @@ -34,7 +34,7 @@ - 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 }}" + dest: "{{ k3s_server_manifests_dir }}/{{ item.filename | default(item.url | basename) }}" mode: 0644 loop: "{{ k3s_server_manifests_urls }}" become: "{{ k3s_become }}" @@ -55,7 +55,7 @@ - name: Ensure auto-deploying manifests are downloaded to the primary controller ansible.builtin.get_url: url: "{{ item.url }}" - dest: "{{ k3s_server_pod_manifests_dir }}/{{ item.filename }}" + dest: "{{ k3s_server_pod_manifests_dir }}/{{ item.filename | default(item.url | basename) }}" mode: 0644 loop: "{{ k3s_server_pod_manifests_urls }}" become: "{{ k3s_become }}"