2
0
Fork 0

Split depend_packages content to 3 vars

This commit is contained in:
Jeremy Gardais 2021-06-23 10:20:41 +02:00
parent 78b0528362
commit f7df94a728
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
4 changed files with 21 additions and 7 deletions

View File

@ -3,6 +3,10 @@
### Enhancement ### Enhancement
* Flatten packages list to allow condition. * Flatten packages list to allow condition.
* Split fusioninventory__agent_depend_packages content to 3 variables (for Debian)
* fusioninventory__agent_depend_packages
* fusioninventory__agent_recommend_packages
* fusioninventory__agent_extra_packages
## v1.3.0 ## v1.3.0

View File

@ -17,6 +17,8 @@ A role to manage FusionInventory agent installation and configuration.
* **fusioninventory__agent_version**: The version of Fusioninventory agent to install [default: `2.4-2`]. * **fusioninventory__agent_version**: The version of Fusioninventory agent to install [default: `2.4-2`].
* **fusioninventory__agent_depend_packages**: List of dependent packages to install. * **fusioninventory__agent_depend_packages**: List of dependent packages to install.
* **fusioninventory__agent_recommend_packages**: List of recommended packages to install.
* **fusioninventory__agent_extra_packages**: List of extra packages to install (eg. to allow installation from a .deb file from Ansible).
* **fusioninventory__agent_package_url**: The URL used to download deb package for fusioninventory-agent [default: `http://debian.fusioninventory.org/downloads/fusioninventory-agent_{{ fusioninventory__agent_version }}_all.deb` for Debian Stretch only]. * **fusioninventory__agent_package_url**: The URL used to download deb package for fusioninventory-agent [default: `http://debian.fusioninventory.org/downloads/fusioninventory-agent_{{ fusioninventory__agent_version }}_all.deb` for Debian Stretch only].
* **fusioninventory__agent_deploy_state**: What is the desired state which this role should achieve [default: `present`]. * **fusioninventory__agent_deploy_state**: What is the desired state which this role should achieve [default: `present`].
* **fusioninventory__agent_service_name**: The service name to manage [default: `fusioninventory-agent`]. * **fusioninventory__agent_service_name**: The service name to manage [default: `fusioninventory-agent`].

View File

@ -13,11 +13,13 @@
paths: paths:
- 'vars' - 'vars'
# Manage fusioninventory related packages [[[1
# Manage dependent packages [[[1 - name: Ensure related packages are installed
- name: Ensure dependent packages are installed
package: package:
name: '{{ fusioninventory__agent_depend_packages | flatten }}' name: '{{ (fusioninventory__agent_depend_packages|d([]) +
fusioninventory__agent_recommend_packages|d([]) +
fusioninventory__agent_extra_packages|d([]))
| flatten }}'
state: 'present' state: 'present'
register: pkg_dep_result register: pkg_dep_result
until: pkg_dep_result is success until: pkg_dep_result is success

View File

@ -2,10 +2,9 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker # .. vim: foldmarker=[[[,]]]:foldmethod=marker
# .. envvar:: fusioninventory__agent_depend_packages # .. envvar:: fusioninventory__agent_depend_packages
#
# List of dependent packages to install. # List of dependent packages to install from a deb file
fusioninventory__agent_depend_packages: fusioninventory__agent_depend_packages:
- 'dmidecode'
- 'fusioninventory-agent' - 'fusioninventory-agent'
- 'hdparm' - 'hdparm'
- 'hwdata' - 'hwdata'
@ -29,6 +28,13 @@ fusioninventory__agent_depend_packages:
- 'ucf' - 'ucf'
- 'usbutils' - 'usbutils'
- 'usb.ids' - 'usb.ids'
# List of recommended packages to install from a deb file
fusioninventory__agent_recommend_packages:
- 'dmidecode'
# List of packages to be able install a deb file with Ansible
fusioninventory__agent_extra_packages:
- 'xz-utils' - 'xz-utils'
fusioninventory__agent_packages: fusioninventory__agent_packages: