diff --git a/roles/glpi/defaults/main.yml b/roles/glpi/defaults/main.yml index 9b375bc..ed994fa 100644 --- a/roles/glpi/defaults/main.yml +++ b/roles/glpi/defaults/main.yml @@ -1,6 +1,16 @@ +#variable depl depl_url: "http://s-adm.gsb.adm/gsbstore" #depl_glpi: "glpi-9.5.6.tgz" depl_glpi: "glpi-10.0.11.tgz" #depl_fusioninventory: "fusioninventory-9.5+3.0.tar.bz2" depl_glpi_agentx64: "GLPI-Agent-1.7-x64.msi" depl_glpi_agentx86: "GLPI-Agent-1.4-x86.msi" + + #variables glpi +glpi_version: "10.0.11" +glpi_dir: "/var/www/html/glpi" +glpi_dbhost: "127.0.0.1" +glpi_dbname: "glpi" +glpi_dbuser: "glpi" +glpi_dbpasswd: "glpi" +glpi_cli: "/var/www/html/glpicli" diff --git a/roles/glpi/files/dbdump b/roles/glpi/files/dbdump index f892580..30be5d9 100644 --- a/roles/glpi/files/dbdump +++ b/roles/glpi/files/dbdump @@ -1,4 +1,4 @@ -#!/bin/sh -chm="/var/www/html/glpi/files/_dumps" +##!/bin/sh +#chm="/var/www/html/glpi/files/_dumps" # Dump base GLPI -mysqldump -uroot -proot glpi |gzip > $chm/$(date +%Y-%m-%d).sql.gz +#mysqldump -uroot -proot glpi |gzip > $chm/$(date +%Y-%m-%d).sql.gz diff --git a/roles/glpi/tasks/main.yml b/roles/glpi/tasks/main.yml index 1eb5837..076a93b 100644 --- a/roles/glpi/tasks/main.yml +++ b/roles/glpi/tasks/main.yml @@ -112,9 +112,9 @@ # dest: /var/www/html/glpi/plugins # remote_src: yes - - name: Creation de ficlient + - name: Creation de glpicli file: - path: /var/www/html/ficlients + path: "{{ glpi_cli }}" state: directory owner: www-data group: www-data @@ -130,21 +130,31 @@ - name: Installation de GLPI Agent windows x64 get_url: url: "{{ depl_url }}/{{ depl_glpi_agentx64 }}" - dest: "/var/www/html/ficlients" + dest: "{{ glpi_cli }}" # - name: Installation de GLPI Agent windows x86 # get_url: # url: "{{ depl_url }}/{{ depl_glpi_agentx86 }}" # dest: "/var/www/html/ficlients" - - name: Copie du script dbdump - copy: - src: dbdump - dest: /root/ + # - name: Copie du script dbdump + #copy: + #src: dbdump + #dest: /root/ - - name: chmod de dbdump - shell: chmod +x /root/dbdump + #- name: chmod de dbdump + #shell: chmod +x /root/dbdump + # - name: initialisation de la base de données de glpi + # command: chdir= {{ glpi_dir }} + - name: lancer la commande de création de la base de donnees glpi + ansible.builtin.shell: php bin/console database:install -f -n + args: + chdir: "{{ glpi_dir }}" + + - debug: + msg: "base de donnees de glpi creer" + - debug: msg: "Redemarrez le serveur GLPI" diff --git a/s-itil.yml b/s-itil.yml index de56dc1..af0aed7 100644 --- a/s-itil.yml +++ b/s-itil.yml @@ -2,13 +2,13 @@ - hosts: localhost connection: local - vars: - glpi_version: "10.0.11" - glpi_dir: "/var/www/html/glpi" - glpi_dbhost: "127.0.0.1" - glpi_dbname: "glpi" - glpi_dbuser: "glpi" - glpi_dbpasswd: "glpi" + #vars: + #glpi_version: "10.0.11" + #glpi_dir: "/var/www/html/glpi" + #glpi_dbhost: "127.0.0.1" + #glpi_dbname: "glpi" + #glpi_dbuser: "glpi" + #glpi_dbpasswd: "glpi" roles: - base