initial commit
This commit is contained in:
22
tasks/01-set-download-url.yml
Normal file
22
tasks/01-set-download-url.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: "Set download url for latest version"
|
||||
ansible.builtin.set_fact:
|
||||
ts3_download_url: "{{ ts3_version_info['json']['linux']['x86_64']['mirrors'][ts3_download_mirror] }}"
|
||||
when:
|
||||
- "ts3_version is defined"
|
||||
- "ts3_version != 'latest'"
|
||||
- "ts3_download_mirror is defined"
|
||||
|
||||
- name: "Set download url if version was specified"
|
||||
ansible.builtin.set_fact:
|
||||
ts3_download_url: "https://files.teamspeak-services.com/releases/server/{{ ts3_version }}/teamspeak3-server_linux_amd64-{{ ts3_version }}.tar.bz2"
|
||||
when:
|
||||
- "ts3_version != 'latest'"
|
||||
- "ts3_download_url is undefined"
|
||||
|
||||
- name: "Assert gathered data is valid"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- "ts3_version is defined"
|
||||
- "ts3_version != 'latest'"
|
||||
- "ts3_download_url is defined"
|
||||
Reference in New Issue
Block a user