supertarto.glpi

Ansible GLPI

CI

This is an Ansible Role for installing and setting up GLPI (Gestionnaire Libre de Parc Informatique). You need to have a Web Server, PHP, and MariaDB on your server. This role is tested only with Apache.

Requirements

Here are the basic needs according to the official GLPI guidelines:

  • A web server (Apache, Nginx, IIS, etc.)
  • MariaDB version 10.0 or higher, or MySQL version 5.6 or higher
  • PHP version 7.2 or higher
  • Required PHP extensions:
    • ctype
    • curl
    • gd (for image generation)
    • iconv
    • intl
    • json
    • mbstring
    • mysqli
    • session
    • simplexml
    • zlib
  • Optional PHP extensions:
    • exif (for image security checks)
    • imap (for email collection and user auth)
    • ldap (for user authentication)
    • openssl (for secure communication)
    • sodium (for better encryption performance)
    • zip and bz2 (for working with zip and bz2 packages)

You can use supertarto.apache, supertarto.mariadb, and supertarto.php to install these components first with Ansible.

Tested Platforms

  • Debian 10 (Buster)
  • Debian 11 (Bullseye)
  • Debian 12 (Bookworm)

Role Variables

Here’s how to set the GLPI version and package name:

glpi_version: 10.0.16
glpi_version_package: glpi-10.0.16.tgz

To automatically complete the installation and configure the database, set this to "true". Do not use this for updates if the database is already set up to avoid errors.

glpi_auto_install: false

Set glpi_update to "true" to force a reinstallation. The URL will use the GLPI version and package name.

glpi_update: false
glpi_download_url: "https://github.com/glpi-project/glpi/releases/download/{{ glpi_version }}/{{ glpi_version_package }}"

Set the web owner, group, and installation path for GLPI:

glpi_web_owner: "www-data"
glpi_web_group: "www-data"
glpi_install_path: /var/www

Details about the GLPI database:

glpi_db_host: "localhost"
glpi_db_port: "3306"
glpi_db_name: "glpi"
glpi_db_user: "glpi"
glpi_db_password: "changeit!"

Examples

Here’s how you can use it:

- hosts: all
  roles:
    - role: supertarto.apache
    - role: supertarto.mariadb
    - role: supertarto.php
    - role: supertarto.glpi
  vars:
    php_packages:
      - php8.2
      - php8.2-gd
      - php8.2-mysql
      - php8.2-curl
      - php8.2-imap
      - php8.2-json
      - php8.2-ldap
      - php8.2-mbstring
      - php8.2-xml
      - php8.2-cli
      - php8.2-xmlrpc
      - php8.2-intl
      - php-apcu
      - php-cas
      - php8.2-zip
      - php8.2-bz2
    glpi_db_host: "localhost"
    glpi_db_port: "3306"
    glpi_db_name: "glpi"
    glpi_db_user: "glpi"
    glpi_db_password: "changeit!"
    apache_create_vhosts: true
    apache_vhosts_filename: "glpi.conf"
    apache_vhost_config:
      - listen_ip: "*"
        listen_port: 80
        server_name: host1
        documentroot: "/var/www/glpi"
        serveradmin: admin@localhost
        custom_param: |
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
          LogLevel warn
        directory:
          - path: "/var/www/glpi"
            config: |
              AllowOverride All
              Order deny,allow
              allow from all

    mariadb_use_dump_script: false
    mariadb_databases:
      - name: "{{ glpi_db_name }}"

    mariadb_users:
      - name: "{{ glpi_db_user }}"
        host: "{{ glpi_db_host }}"
        password: "{{ glpi_db_password }}"
        priv: "{{ glpi_db_name }}.*:SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES"

Installation

Run this command to install the role:

ansible-galaxy role install supertarto.glpi

License

This software is under GPL V3.0 license.

Informazioni sul progetto

Install and configure GLPI with Ansible

Installa
ansible-galaxy install supertarto.glpi
Licenza
gpl-3.0
Download
324
Proprietario