forked from gadmin/gsb2023
Premier commit
This commit is contained in:
3
roles/old/itil-cs/files/.my.cnf
Normal file
3
roles/old/itil-cs/files/.my.cnf
Normal file
@@ -0,0 +1,3 @@
|
||||
[client]
|
||||
user=root
|
||||
password=root
|
12
roles/old/itil-cs/files/glpi.conf
Normal file
12
roles/old/itil-cs/files/glpi.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
DocumentRoot /var/www/glpi
|
||||
<Directory /var/www/glpi>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride All
|
||||
Order allow,deny
|
||||
allow from all
|
||||
AuthType Basic
|
||||
</Directory>
|
||||
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
|
||||
CustomLog ${APACHE_LOG_DIR}/glpi_access.log combined
|
||||
ErrorLog ${APACHE_LOG_DIR}/glpi_error.log
|
4
roles/old/itil-cs/files/script
Normal file
4
roles/old/itil-cs/files/script
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
chm= »/var/www/html/glpi/files/_dumps »
|
||||
# Dump base GLPI
|
||||
mysqldump -uroot -proot glpi |gzip > $chm/$(date +%Y-%m-%d).sql.gz
|
6
roles/old/itil-cs/handlers/main.yml
Normal file
6
roles/old/itil-cs/handlers/main.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: restart apache2
|
||||
service: name=apache2 state=restarted
|
||||
|
||||
- name: restart mysql-server
|
||||
service: name=mysql-server state=restarted
|
65
roles/old/itil-cs/tasks/main.yml
Normal file
65
roles/old/itil-cs/tasks/main.yml
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
- name: Install apache2
|
||||
apt: name=apache2 state=present update_cache=yes
|
||||
notify:
|
||||
- restart apache2
|
||||
|
||||
- name: Install php5
|
||||
apt: name=php5 state=present update_cache=yes
|
||||
|
||||
- name: Install php5-mysql
|
||||
apt: name=php5-mysql state=present update_cache=yes
|
||||
|
||||
- name: Install php5-gd
|
||||
apt: name=php5-gd state=present update_cache=yes
|
||||
|
||||
- name: Install php5-curl
|
||||
apt: name=php5-curl state=present update_cache=yes
|
||||
|
||||
- name: Install php5-imap
|
||||
apt: name=php5-imap state=present update_cache=yes
|
||||
|
||||
- name: Install php5-ldap
|
||||
apt: name=php5-ldap state=present update_cache=yes
|
||||
|
||||
- name: Download GLPI from Internet
|
||||
copy: src=glpi-9.1.3.tgz dest=/var/www/
|
||||
|
||||
- name: Instructions
|
||||
debug: msg="En cas de problemes, relancez le playbook une seconde fois."
|
||||
|
||||
- name: unpack tarball
|
||||
unarchive: src=/var/www/glpi-9.1.3.tgz dest=/var/www/
|
||||
|
||||
- name: Fix permissions
|
||||
shell: chown -R www-data:www-data /var/www/glpi/
|
||||
|
||||
- name: copy .my.cnf file with root password credentials
|
||||
copy: src=.my.cnf dest=/root/tools/ansible/.my.cnf owner=root mode=0600
|
||||
|
||||
|
||||
- name: Print web instructions
|
||||
debug: msg="/!\ Se rendre sur http://adresse_ip_de_votre_serveur/glpi et suivre l'installation"
|
||||
|
||||
- name: Download Fusioninventory from Internet
|
||||
copy: src=fusioninventory-for-glpi_0.85+1.3.tar.gz dest=/var/www/glpi/plugins
|
||||
|
||||
- name: unpack tarball
|
||||
unarchive: src=/var/www/glpi/plugins/fusioninventory-for-glpi_0.85+1.3.tar.gz dest=/var/www/glpi/plugins
|
||||
|
||||
- name: Print web instructions
|
||||
debug: msg="(i) Fusioninventory plugin installed in /var/www/glpi/plugins"
|
||||
|
||||
- name: copy glpi.conf
|
||||
copy: src=glpi.conf dest=/etc/apache2/sites-available/
|
||||
|
||||
- name: activation du site glpi
|
||||
shell: a2ensite glpi.conf
|
||||
notify:
|
||||
- restart apache2
|
||||
|
||||
- name: copie script
|
||||
copy: src=script dest=/root/
|
||||
|
||||
- name: chmod
|
||||
shell: chmod +x /root/script
|
Reference in New Issue
Block a user