[ADD] Restores Zabbix db
This commit is contained in:
parent
a44f6f3bab
commit
d2dd3da3fa
@ -21,8 +21,21 @@
|
|||||||
objs: public
|
objs: public
|
||||||
role: 'zabbix'
|
role: 'zabbix'
|
||||||
|
|
||||||
- name: 'Instalar extensión timescaledb'
|
- name: 'PostgreSQL verify or create schema'
|
||||||
postgresql_ext:
|
when: zabbix_server_database_sqlload
|
||||||
|
block:
|
||||||
|
- name: 'PostgreSQL | Get current database version'
|
||||||
|
postgresql_query:
|
||||||
|
login_user: 'zabbix'
|
||||||
|
login_password: '{{ zabbix_pgsql_pass }}'
|
||||||
db: 'zabbix'
|
db: 'zabbix'
|
||||||
name: timescaledb
|
query: 'SELECT mandatory FROM dbversion'
|
||||||
|
rescue:
|
||||||
|
- name: 'PostgreSQL | Import schema'
|
||||||
|
postgresql_db:
|
||||||
|
login_user: 'zabbix'
|
||||||
|
login_password: '{{ zabbix_pgsql_pass }}'
|
||||||
|
db: 'zabbix'
|
||||||
|
state: restore
|
||||||
|
target: /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user