Merge pull request #177 from kossmac/main

use basename of url for items in k3s_server_manifests_urls and k3s_se…
This commit is contained in:
Xan Manning 2022-01-30 14:04:37 +00:00 committed by GitHub
commit 594606d420
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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 }}"