2
0
Fork 0

Compare commits

...

5 Commits

5 changed files with 39 additions and 18 deletions

View File

@ -1,3 +1,17 @@
## v1.3.1
### Fix
* Update package list for Debian from `dpkg --info` of the last 2.6 version (fix #11).
### Enhancement
* 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
### Fix

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_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_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`].

View File

@ -17,9 +17,7 @@
block:
- name: Load additional repository settings for CentOS or RedHat 8
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
- name: Override repository settings for CentOS <= 8.2
include_vars: "CentOS-8.2.yml"

View File

@ -13,14 +13,14 @@
paths:
- 'vars'
# Manage dependent packages [[[1
- name: Ensure dependent packages are installed
# Manage fusioninventory related packages [[[1
- name: Ensure related packages are installed
package:
name: '{{ item }}'
name: '{{ (fusioninventory__agent_depend_packages|d([]) +
fusioninventory__agent_recommend_packages|d([]) +
fusioninventory__agent_extra_packages|d([]))
| flatten }}'
state: 'present'
with_flattened:
- '{{ fusioninventory__agent_depend_packages | to_nice_json }}'
register: pkg_dep_result
until: pkg_dep_result is success
when: fusioninventory__agent_deploy_state == "present"
@ -38,7 +38,7 @@
- name: Ensure fusioninventory-agent package from REPOS
package:
name: '{{ fusioninventory__agent_packages }}'
name: '{{ fusioninventory__agent_packages | flatten }}'
state: '{{ "present" if (fusioninventory__agent_deploy_state == "present")
else "absent" }}'
register: pkg_agent_repo_result

View File

@ -2,12 +2,9 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
# .. 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:
- 'dmidecode'
- 'fusioninventory-agent'
- 'hdparm'
- 'hwdata'
- 'libfile-which-perl'
- 'libhttp-daemon-perl'
@ -25,10 +22,20 @@ fusioninventory__agent_depend_packages:
- 'libyaml-perl'
- 'libyaml-tiny-perl'
- 'lsb-base'
- 'pciutils'
- 'ucf'
- 'usbutils'
- 'usb.ids'
# List of recommended packages to install from a deb file
fusioninventory__agent_recommend_packages:
- 'dmidecode'
- '{{ "util-linux"
if ansible_distribution_release in
[ "stretch" ]
else "fdisk" }}'
- 'hdparm'
- 'libio-socket-ssl-perl'
# List of packages to be able install a deb file with Ansible
fusioninventory__agent_extra_packages:
- 'xz-utils'
fusioninventory__agent_packages: