initial commit

This commit is contained in:
Johann 2025-08-21 15:31:19 +02:00
commit 8e27e10f26
12 changed files with 202 additions and 0 deletions

33
roles/glpi/tasks/main.yml Normal file
View file

@ -0,0 +1,33 @@
---
- name: Download GLPI archive
ansible.builtin.get_url:
url: "{{ glpi_archive_url }}"
dest: '/var/www'
owner: root
group: nogroup
mode: '0600'
register: glpi_archive
- name: Extract the archive
ansible.builtin.unarchive:
remote_src: true
src: "{{ glpi_archive.dest }}"
dest: '/var/www'
owner: www-data
group: nogroup
mode: '0700'
- name: Rename the folder
ansible.builtin.command:
argv:
- '/usr/bin/mv'
- '/var/www/glpi'
- "{{ glpi_folderpath }}"
changed_when: true
- name: Link the glpi folder with version to glpi
ansible.builtin.file:
src: "{{ glpi_folderpath }}"
path: '/var/www/glpi'
state: link
...

4
roles/glpi/vars/main.yml Normal file
View file

@ -0,0 +1,4 @@
---
glpi_archive_url: 'https://github.com/glpi-project/glpi/releases/download/10.0.19/glpi-10.0.19.tgz'
glpi_folderpath: '/var/www/glpi_v10.0.19'
...