Update to 2021-05-26 20:00

master
Daniel Berteaud 4 years ago
parent 27b71398a4
commit 20c89a1e52
  1. 1
      roles/glpi/tasks/cleanup.yml
  2. 5
      roles/glpi/tasks/conf.yml
  3. 18
      roles/glpi/tasks/install.yml

@ -13,7 +13,6 @@
with_items:
- "{{ glpi_root_dir }}/tmp/glpi"
- "{{ glpi_root_dir }}/tmp/glpi-{{ glpi_version }}.tgz"
- "{{ glpi_root_dir }}/tmp/glpi.sql"
- "{{ glpi_root_dir }}/db_dumps"
- /etc/backup/pre.d/glpi_{{ glpi_id }}_dump_db
- /etc/backup/post.d/glpi_{{ glpi_id }}_rm_dump

@ -20,6 +20,11 @@
- config_path.php
tags: glpi
- name: Init database
command: "/bin/php{{ glpi_php_version }} {{ glpi_root_dir }}/web/bin/console -n -r db:install"
when: glpi_install_mode == 'install'
tags: glpi
- name: Upgrade database
command: "/bin/php{{ glpi_php_version }} {{ glpi_root_dir }}/web/bin/console -n db:update"
when: glpi_install_mode == 'upgrade'

@ -110,24 +110,6 @@
- set_fact: glpi_db_created={{ db_created }}
tags: glpi
- name: Create a safer MySQL schema file
shell: grep -v 'DROP TABLE' {{ glpi_root_dir }}/web/install/mysql/glpi-empty.sql > {{ glpi_root_dir }}/tmp/glpi.sql
when: glpi_install_mode == 'install'
tags: glpi
- name: Inject MySQL schema
mysql_db:
name: "{{ glpi_mysql_db }}"
state: import
target: "{{ glpi_root_dir }}/tmp/glpi.sql"
login_host: "{{ glpi_mysql_server }}"
login_user: sqladmin
login_password: "{{ mysql_admin_pass }}"
when:
- glpi_install_mode == 'install'
- glpi_db_created.changed
tags: glpi
- name: Deploy cron task
cron:
name: glpi_{{ glpi_id }}

Loading…
Cancel
Save