ipr-cnrs.fusioninventory

FusionInventory

Since the fusioninventory-agent is no longer maintained, it's recommended to use the "new" glpi-agent role.

  1. Overview
  2. Role Variables
  3. Example Playbook
  4. Configuration
  5. Development
  6. License
  7. Author Information

Overview

This role is for managing the installation and setup of the FusionInventory agent.

Role Variables

  • fusioninventory__agent_version: The version of the FusionInventory agent to install [default: 2.6-1].
  • fusioninventory__agent_depend_packages: List of required packages to install.
  • fusioninventory__agent_recommend_packages: List of suggested packages to install.
  • fusioninventory__agent_extra_packages: List of additional packages to install (e.g., for installing from a .deb file using Ansible).
  • fusioninventory__agent_package_url: The URL for downloading the deb package for fusioninventory-agent [default: "https://github.com/fusioninventory/fusioninventory-agent/releases/download/" + fusioninventory__agent_major_version + "/fusioninventory-agent_" + fusioninventory__agent_version + "_all.deb" for Debian Stretch only].
  • fusioninventory__agent_deploy_state: Desired state this role should achieve [default: present].
  • fusioninventory__agent_service_name: The name of the service to manage [default: fusioninventory-agent].
  • fusioninventory__agent_service_manage: Whether to manage the fusioninventory agent service [default: true].
  • fusioninventory__agent_conf_src: Template for the agent configuration file [default: ../templates/etc/fusioninventory/agent.cfg.j2].
  • fusioninventory__agent_service_status: The state of the service, can be started, stopped, restarted, or reloaded [default : started].
  • fusioninventory__agent_service_enabled: Service status, can be enabled (true) or disabled (false) [default: true].

Cron Variables

  • fusioninventory__agent_conf_cron: Enable ("present") or disable ("absent") a cron job for the agent [default: "absent"].
  • fusioninventory__agent_conf_cron_day: Days when the agent should run [default: "*"].
  • fusioninventory__agent_conf_cron_hour: Hours when the agent should run [default: "23"].
  • fusioninventory__agent_conf_cron_minute: Minutes when the agent should run [default: "0"].
  • fusioninventory__agent_conf_cron_month: Months when the agent should run [default: "*"].
  • fusioninventory__agent_conf_cron_weekday: Weekdays when the agent should run [default: "*"].
  • fusioninventory__agent_conf_cron_user: User under which the agent should run [default: "root"].
  • fusioninventory__agent_conf_command: Command that cron should run [default: "sleep $(( RANDOM \\% 3600 )); /usr/bin/fusioninventory-agent"].

Config Specific Variables

Variables for creating the FusionInventory agent's configuration file from the Ansible template:

  • fusioninventory__agent_conf_server_url: The URL of your FusionInventory server/GLPI/… [default: ``].
  • fusioninventory__agent_conf_local_dir: Directory to write task results [default: ``].
  • fusioninventory__agent_conf_no_task: Tasks to exclude from running (comma-separated) [default: ``].
  • fusioninventory__agent_conf_tasks: Tasks to run in order (comma-separated) [default: ``].
  • fusioninventory__agent_conf_delaytime: Initial delay before the first target [default: 3600].
  • fusioninventory__agent_conf_no_category: Categories to exclude from inventory tasks (comma-separated) [default: ``].
  • fusioninventory__agent_conf_scan_homedirs: Enable scanning of user home directories [default: false].
  • fusioninventory__agent_conf_scan_profiles: Enable scanning of user lists [default: false].
  • fusioninventory__agent_conf_no_ssl_check: Disable SSL certificate checking for the server [default: false].
  • fusioninventory__agent_conf_no_httpd: Disable the embedded web server [default: true].
  • fusioninventory__agent_conf_httpd_ip: Interface/IP for the web server to listen on [default: ``].
  • fusioninventory__agent_conf_httpd_port: TCP port the web server uses to listen [default: 62354].
  • fusioninventory__agent_conf_httpd_trust: Hostname or IP/subnet allowed for HTTP requests [default: ``].
  • fusioninventory__agent_conf_log_logger: Specifies which logger backend to use [default: syslog].
  • fusioninventory__agent_conf_log_facility: Specifies the syslog facility for the syslog logger [default: LOG_DAEMON].
  • fusioninventory__agent_conf_log_file: File for the file logger [default: /var/log/fusioninventory.log].
  • fusioninventory__agent_conf_log_file_maxsize: Maximum size for the log file, in MB [default: 0].
  • fusioninventory__agent_conf_log_color: Enable color display for the stderr logger [default: false].
  • fusioninventory__agent_conf_tag: Add a tag to inventory results [default: ``].
  • fusioninventory__agent_conf_debug: Enable debug mode [default: false].

Example Playbook

  • Using default variables:
- hosts: mynode.DOMAIN
  roles:
    - role: ipr-cnrs.fusioninventory
      tags: ['role::fusioninventory', 'ipr', 'inventory']
  • Install fusioninventory-agent from a repository (which may not be available for Debian Stretch and is disabled by default for other releases):
- hosts: mynode.DOMAIN
  roles:
    - role: ipr-cnrs.fusioninventory
      fusioninventory__agent_package_url: ''
      tags: ['role::fusioninventory', 'ipr', 'inventory']

Configuration

This role will:

  • Install required packages for fusioninventory-agent.
  • Once installed, the dependencies will not be removed.
  • Install the fusioninventory-agent package from the official project URL.
  • Create the agent's configuration file.
  • Manage the agent's systemd service.

Development

This source code comes from our Gogs instance, and the GitHub repo is primarily for sharing the role with Ansible Galaxy.

Feel free to report issues or submit pull requests here!

Thanks to this hook, GitHub will automatically receive updates from our Gogs instance!

License

WTFPL

Author Information

Jérémy Gardais

Informazioni sul progetto

Manage FusionInventory Agent

Installa
ansible-galaxy install ipr-cnrs.fusioninventory
Licenza
Unknown
Download
1.6k
Proprietario
Institut de Physique de Rennes https://ipr.univ-rennes1.fr/ Tutelles CNRS et Université Rennes 1