mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2024-12-05 02:40:19 +01:00
use basename of url for items in k3s_server_manifests_urls and k3s_server_pod_manifests_urls if filename is not provided
Signed-off-by: Karsten Kosmala <kosmala@cosmocode.de>
This commit is contained in:
parent
3be9eff967
commit
424145881c
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
Loading…
Reference in a new issue