removed meta dependencies, added task to install required roles

This commit is contained in:
Bertrand Lanson 2023-04-08 00:33:24 +02:00
parent 43487d9527
commit 5ec8cf4418
4 changed files with 12 additions and 3 deletions

View File

@ -28,7 +28,7 @@ This variable is a list of packages, with their name, desired version and state.
Dependencies
------------
This role requires `ednxzu.manage_apt_packages` to install python3 and pip. If you already installed python and pip, you can skip dependencies by setting `manage_pip_packages_install_prereqs` to `false`.
This role has a task that installs its own dependencies located in `task/prerequisites.yml`, so that you don't need to manage them. This role requires `ednxzu.manage_apt_packages` to install python3 and pip. If you already installed python and pip, you can skip dependencies by setting `manage_pip_packages_install_prereqs` to `false`.
Example Playbook
----------------

View File

@ -22,5 +22,4 @@ galaxy_info:
- 'pip'
- 'packages'
dependencies:
- name: ednxzu.manage_apt_packages
dependencies: []

View File

@ -1,5 +1,13 @@
---
# task/prerequisites file for manage_pip_packages
- name: "Install required roles"
ansible.builtin.command:
cmd: "ansible-galaxy install {{ item }}"
loop: "{{ manage_pip_packages_prerequisites_roles }}"
changed_when: false
delegate_to: localhost
run_once: true
- name: "Install python3 and pip"
ansible.builtin.include_role:
name: ednxzu.manage_apt_packages

View File

@ -1,5 +1,7 @@
---
# vars file for manage_pip_packages
manage_pip_packages_prerequisites_roles:
- ednxzu.manage_apt_packages
manage_pip_packages_required_packages:
- name: python3
version: latest