evomaintenance: database variables must be set or the task fails

This commit is contained in:
Jérémy Lecour 2018-12-11 10:50:07 +01:00 committed by Jérémy Lecour
parent 2a6cb3b381
commit d0b3b6d6b8
3 changed files with 13 additions and 4 deletions

View file

@ -11,6 +11,7 @@ The **patch** part changes incrementally at each release.
## [Unreleased]
### Added
* evomaintenance: database variables must be set or the task fails
### Changed

View file

@ -3,6 +3,14 @@
- set_fact:
minifirewall_restart_handler_name: "{{ minifirewall_restart_if_needed | ternary('restart minifirewall', 'restart minifirewall (noop)') }}"
- assert:
that:
- evomaintenance_pg_passwd is not none
- evomaintenance_pg_db is not none
- evomaintenance_pg_table is not none
- evomaintenance_pg_host is not none
msg: evomaintenance database variables must be set
- include: install_package_debian.yml
when:
- not evomaintenance_install_vendor

View file

@ -1,11 +1,11 @@
HOSTNAME={{ evomaintenance_hostname }}
EVOMAINTMAIL={{ evomaintenance_alert_email or general_alert_email | mandatory }}
export PGPASSWORD={{ evomaintenance_pg_passwd | mandatory }}
export PGPASSWORD={{ evomaintenance_pg_passwd }}
PGDB={{ evomaintenance_pg_db | mandatory }}
PGTABLE={{ evomaintenance_pg_table | mandatory }}
PGHOST={{ evomaintenance_pg_host | mandatory }}
PGDB={{ evomaintenance_pg_db }}
PGTABLE={{ evomaintenance_pg_table }}
PGHOST={{ evomaintenance_pg_host }}
FROM={{ evomaintenance_from }}
FULLFROM="{{ evomaintenance_full_from }}"
URGENCYFROM={{ evomaintenance_urgency_from }}