GSquad934.glpi
Ansible Role: GLPI
This role sets up and configures GLPI. It relies on two other roles:
Once MariaDB and Nginx (from the two roles above) are ready, this role will:
- Download the latest version of GLPI
- Create a system user and set up the database for the WebApp
- Configure and enable a Website in Nginx to access GLPI
- Set up HTTPS and create certificates using Let's Encrypt (if the Website's Fully Qualified Domain Name (FQDN) can be resolved)
- If the FQDN cannot be resolved, it will deploy default SSL certificates
Requirements
There are no specific requirements for this role.
Role Variables
You need to set several variables to configure GLPI correctly. Here’s an example of how to set them:
glpi_user: glpi
glpi_password: MyPassword
glpi_db_password: MyPassword
glpi_hostname: glpi.mysite.com
certbot_email: [email protected]
db_server: "{{ inventory_hostname }}" (this means *localhost*)
glpi_server: localhost
glpi_version: 9.1.6
You can set these variables as group_vars or host_vars. For security, the credentials should be stored in a separate encrypted file using ansible-vault.
Dependencies
This role depends on the two roles mentioned earlier:
If you install this role via Ansible-Galaxy, the role names are GSquad934.database and GSquad934.webserver.
If you already have MariaDB and Nginx installed, you can still use this role with some adjustments.
Example Playbook
Here’s a simple playbook to use this role:
hosts: glpi_srv
user: myuser
become: true
roles:
- { role: glpi, tags: [ 'glpi' ] }
License
MIT / BSD
Author Information
My name is Gaétan. You can follow me on Twitter.
Website: ICT Pour Tous