2022-06-25 00:50:44 +02:00
|
|
|
- name: Download & install static binaries
|
|
|
|
ansible.builtin.get_url:
|
|
|
|
url: "{{ item.url }}"
|
2022-07-27 13:33:04 +02:00
|
|
|
url_username: "{{ item.username | default(omit) }}"
|
|
|
|
url_password: "{{ item.password | default(omit) }}"
|
2022-06-25 08:33:12 +02:00
|
|
|
dest: /usr/local/bin/{{ item.filename }}
|
2022-06-25 00:50:44 +02:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0755
|
2023-01-17 12:21:40 +01:00
|
|
|
register: staticbinary_download
|
2022-06-25 18:44:43 +02:00
|
|
|
loop: "{{ dependencies.static_binaries | selectattr('archive', 'undefined') }}"
|
2022-06-26 17:54:19 +02:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.filename }}"
|
2023-01-17 12:21:40 +01:00
|
|
|
retries: 5
|
|
|
|
delay: 5
|
|
|
|
until: staticbinary_download is not failed
|
2022-06-25 18:44:43 +02:00
|
|
|
|
2022-06-25 23:32:29 +02:00
|
|
|
- name: Download, extract & install archived static binaries
|
|
|
|
include_tasks: dependencies.archive_compressed.yml
|
|
|
|
loop: "{{ dependencies.static_binaries | rejectattr('archive', 'undefined') | selectattr('archive', 'equalto', 'compressed') }}"
|
2022-06-25 23:57:55 +02:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.filename }}"
|
2022-06-25 00:50:44 +02:00
|
|
|
|
|
|
|
- name: Install ansible-galaxy collections
|
2022-06-24 23:44:10 +02:00
|
|
|
ansible.builtin.shell:
|
2022-06-25 08:33:12 +02:00
|
|
|
cmd: ansible-galaxy collection install {{ item }}
|
2022-11-17 11:21:19 +01:00
|
|
|
register: collections
|
2022-06-24 23:44:10 +02:00
|
|
|
loop: "{{ dependencies.ansible_galaxy_collections }}"
|
2022-11-17 11:21:19 +01:00
|
|
|
retries: 5
|
|
|
|
delay: 5
|
|
|
|
until: collections is not failed
|
2022-06-25 00:50:44 +02:00
|
|
|
|
2022-06-25 08:28:44 +02:00
|
|
|
- name: Install distro packages
|
|
|
|
ansible.builtin.apt:
|
2022-08-03 14:39:36 +02:00
|
|
|
pkg: "{{ dependencies.packages.apt }}"
|
2022-06-25 18:44:43 +02:00
|
|
|
state: latest
|
2022-06-25 08:28:44 +02:00
|
|
|
update_cache: yes
|
|
|
|
install_recommends: no
|
|
|
|
|
2022-06-25 18:44:43 +02:00
|
|
|
- name: Upgrade all packages
|
2022-06-25 08:28:44 +02:00
|
|
|
ansible.builtin.apt:
|
2022-06-25 08:33:12 +02:00
|
|
|
name: '*'
|
2022-06-25 08:28:44 +02:00
|
|
|
state: latest
|
2022-06-25 18:44:43 +02:00
|
|
|
update_cache: yes
|
|
|
|
|
2022-08-03 14:39:36 +02:00
|
|
|
- name: Install additional python packages
|
|
|
|
ansible.builtin.pip:
|
|
|
|
name: "{{ dependencies.packages.pip }}"
|
|
|
|
state: latest
|
|
|
|
|
2022-06-25 18:44:43 +02:00
|
|
|
- name: Cleanup apt cache
|
|
|
|
ansible.builtin.apt:
|
|
|
|
autoremove: yes
|
|
|
|
purge: yes
|