Refactor package installation
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Danny Bessems 2022-08-03 14:39:36 +02:00
parent c48f27c42e
commit 01e168a7f9
5 changed files with 21 additions and 21 deletions

View File

@ -31,7 +31,7 @@
- name: Install distro packages
ansible.builtin.apt:
pkg: "{{ dependencies.packages }}"
pkg: "{{ dependencies.packages.apt }}"
state: latest
update_cache: yes
install_recommends: no
@ -42,6 +42,11 @@
state: latest
update_cache: yes
- name: Install additional python packages
ansible.builtin.pip:
name: "{{ dependencies.packages.pip }}"
state: latest
- name: Cleanup apt cache
ansible.builtin.apt:
autoremove: yes

View File

@ -1,6 +0,0 @@
- name: Install ansible (w/ dependencies)
ansible.builtin.pip:
name: "{{ item }}"
executable: pip3
state: latest
loop: "{{ pip_packages }}"

View File

@ -15,6 +15,3 @@
- name: Install packages
import_tasks: packages.yml
- name: Install ansible
import_tasks: ansible.yml

View File

@ -13,8 +13,10 @@
- name: Install additional python packages
ansible.builtin.pip:
name: "{{ packages.pip }}"
name: "{{ item }}"
executable: pip3
state: latest
loop: "{{ packages.pip }}"
- name: Cleanup
ansible.builtin.apt:

View File

@ -1,11 +1,13 @@
packages:
- jq
# (python3-*) Dependency for installation of Ansible
- python3-pip
- python3-setuptools
- python3-wheel
pip_packages:
- pip
- ansible-core
- lxml
apt:
- jq
# (python3-*) Dependency for installation of Ansible
- python3-pip
# - python3-setuptools
# - python3-wheel
pip:
- ansible-core
- lxml
- pip
- setuptools
- wheel