This role will try to install and manage glpi-agent on Linux systems (Debian family only at the beginning).
It's heavily inspired from the previous role dedicated to fusioninventory-agent.
Boolean. Enable or disable glpi-agent's installation and configuration.
glpi_agent__enabled: true
Boolean. If GLPI Agent package should be installed from package build by GLIP project.
glpi_agent__install_from_url: false
String. GLPI Agent version to install.
glpi_agent__version: '1.5-1'
String. Extract the major version in order to build glpi_agent__package_url variable.
glpi_agent__major_version: '{{ glpi_agent__version.split("-")[0] }}'
List. GLPI Agent package name to install.
glpi_agent__package_name:
- glpi-agent
The URL used to download .deb package for GLPI Agent. eg for version 1.5 : https://github.com/glpi-project/glpi-agent/releases/download/1.5/glpi-agent_1.5-1_all.deb
glpi_agent__package_url: '{{ "https://github.com/glpi-project/glpi-agent/releases/download/"
+ glpi_agent__major_version
+ "/glpi-agent_"
+ glpi_agent__version
+ "_all.deb" if (ansible_os_family in ["Debian"])
else "" }}'
Boolean. If GLPI Agent dependencies should be installed. Required for installation from URL and because some might be missing from dependencies list… See the dependencies list in OS vars files (Debian) below.
glpi_agent__depends: '{{ True if ansible_os_family in ["Debian"]
else False }}'
Boolean. If GLPI Agent packages recommandations should be installed. See the recommandations list in OS vars files (Debian) below.
glpi_agent__recommends: false
Boolean. If GLPI Agent packages suggestions should be installed. See the suggestions list in OS vars files (Debian) below.
glpi_agent__suggests: false
The official documentation recommends to uninstall fusioninventory agent before installing GLPI Agent. Packages and related configuration files won't be purge by this role.
State of previous Fusioninventory agent.
glpi_agent__fusioninventory_agent_state: 'absent'
List of Fusioninventory agent packages to remove.
glpi_agent__fusioninventory_agent_packages:
- fusioninventory-agent
See official documentation for all parameters syntax.
String. Path to GLPI Agent configuration file on the host.
glpi_agent__conf_file_dest: '/etc/glpi-agent/conf.d/00-ansible.cfg'
String. Template used to provide GLPI Agent configuration file.
glpi_agent__conf_file_src: '{{ "../templates" + glpi_agent__conf_file_dest + ".j2" }}'
String. Template used to provide GLPI Agent configuration file.
glpi_agent__conf_raw: ''
Usage exemple:
glpi_agent__conf_raw: |
tag = my_new_tag
String. The targeted service status
glpi_agent__service_state: '{{ "started" if (glpi_agent__enabled | bool)
else "stopped" }}'
String. The targeted service status
glpi_agent__service_enabled: '{{ glpi_agent__enabled | bool }}'
Instead of running a systemd service, glpi-agent
can be ran by a cronjob.
These variables can't be overrided by the user.
List. Dependencies for GLPI Agent package.
dpkg --info
output for .deb package version 1.5-1.glpi_agent__depends_packages:
- perl
- ucf
- lsb-base
- libnet-cups-perl
- libnet-ip-perl
- libnet-ssh2-perl
- libwww-perl
- libparse-edid-perl
- libproc-daemon-perl
- libparallel-forkmanager-perl
- libuniversal-require-perl
- libfile-which-perl
- libxml-libxml-perl
- libyaml-perl
- libtext-template-perl
- libcpanel-json-xs-perl
- libjson-pp-perl
- pciutils
- usbutils
- libhttp-daemon-perl
- libyaml-tiny-perl
- libossp-uuid-perl
- libdatetime-perl
- libsocket-getaddrinfo-perl
## Missing from `dpkg --info` but used in glpi-agent workflow
- libxml-treepp-perl
- libxml-xpath-perl
List. Recommandations for GLPI Agent package.
dpkg --info
output for .deb package version 1.5-1.glpi_agent__recommends_packages:
- libio-socket-ssl-perl
- dmidecode
- hdparm
- fdisk
- net-tools
List. Suggestions for GLPI Agent package.
dpkg --info
output for .deb package version 1.5-1.glpi_agent__suggests_packages:
- smartmontools
- read-edid
All PRs are welcome :)
For defaults/main.yml
and vars files :
Feel free to share any good practices (for Debian/CentOS) and requests (and PRs 😀).
Jérémy Gardais