Refactor package installation
Some checks failed
continuous-integration/drone/push Build is failing

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 - name: Install distro packages
ansible.builtin.apt: ansible.builtin.apt:
pkg: "{{ dependencies.packages }}" pkg: "{{ dependencies.packages.apt }}"
state: latest state: latest
update_cache: yes update_cache: yes
install_recommends: no install_recommends: no
@ -42,6 +42,11 @@
state: latest state: latest
update_cache: yes update_cache: yes
- name: Install additional python packages
ansible.builtin.pip:
name: "{{ dependencies.packages.pip }}"
state: latest
- name: Cleanup apt cache - name: Cleanup apt cache
ansible.builtin.apt: ansible.builtin.apt:
autoremove: yes 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 - name: Install packages
import_tasks: packages.yml import_tasks: packages.yml
- name: Install ansible
import_tasks: ansible.yml

View File

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

View File

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