98 lines
2.3 KiB
YAML
98 lines
2.3 KiB
YAML
- name: apt update
|
|
tags: update
|
|
apt:
|
|
update-cache: yes
|
|
cache_valid_time: 3600
|
|
|
|
- name: installation des utilitaires
|
|
tags: utils
|
|
apt:
|
|
name:
|
|
- mariadb-server
|
|
- apache2
|
|
- php
|
|
- php-mysqli
|
|
- php-bz2
|
|
- php-zip
|
|
- php-intl
|
|
- php-simplexml
|
|
- php-xml
|
|
- php-gd
|
|
- php-curl
|
|
- php-mbstring
|
|
- php-imap
|
|
- php-ldap
|
|
- php-xmlrpc
|
|
- php-apcu
|
|
- python3-pymysql
|
|
state: present
|
|
|
|
- name: Mise du service apache2 en "enable"
|
|
ansible.builtin.systemd:
|
|
state: started
|
|
name: apache2
|
|
|
|
- name: Telechargement de GLPI
|
|
ansible.builtin.unarchive:
|
|
src: http://depl/store/glpi-9.5.7.tgz
|
|
dest: /var/www/html
|
|
remote_src: yes
|
|
|
|
- name: Change file ownership, group and permissions
|
|
ansible.builtin.file:
|
|
path: /var/www/html/glpi
|
|
owner: www-data
|
|
group: www-data
|
|
mode: '0775'
|
|
recurse: yes
|
|
|
|
- name: "MYSQL - creation base de données glpi"
|
|
community.mysql.mysql_db:
|
|
name: glpi
|
|
state: present
|
|
login_unix_socket: /var/run/mysqld/mysqld.sock
|
|
check_implicit_admin: yes
|
|
|
|
- name: Création de l'utilisateur glpi
|
|
mysql_user:
|
|
name: glpi
|
|
password: glpi
|
|
priv: '*.*:ALL,GRANT'
|
|
state: present
|
|
login_unix_socket: /var/run/mysqld/mysqld.sock
|
|
|
|
- name: Création du repertoire ficlients
|
|
file:
|
|
path: /var/www/html/ficlients
|
|
state: directory
|
|
|
|
- name: Mise en place du plugins fusioninventory
|
|
ansible.builtin.unarchive:
|
|
src: http://depl/store/fusioninventory-9.5%2b3.0.tar.bz2
|
|
dest: /var/www/html/glpi/plugins
|
|
remote_src: yes
|
|
|
|
- name: Mise en place de fusioninventory agent 32bits dans ficlients
|
|
get_url:
|
|
url: http://depl/store/fusioninventory-agent_windows-x86_2.5.1.exe
|
|
dest: /var/www/html/ficlients
|
|
|
|
- name: Mise en place de fusioninventory agent 64bits dans ficlients
|
|
get_url:
|
|
url: http://depl/store/fusioninventory-agent_windows-x64_2.6.exe
|
|
dest: /var/www/html/ficlients
|
|
|
|
- name: accès en écriture et lecture de l'utilisateur www-data
|
|
ansible.builtin.file:
|
|
path: /var/www/html/glpi/plugins/fusioninventory
|
|
owner: www-data
|
|
group: www-data
|
|
mode: '0775'
|
|
recurse: yes
|
|
|
|
- name: Message d'information
|
|
tags: msg
|
|
debug: msg="GLPI sera accessible depuis l'adresse http://onfinfra/glpi/"
|
|
|
|
notify: restart apache
|