evomaintenance: extract a config.yyml tasks file

This commit is contained in:
Jérémy Lecour 2021-08-30 09:24:57 +02:00 committed by Jérémy Lecour
parent 74ab96d67f
commit 65750d2aa6
5 changed files with 25 additions and 21 deletions

View File

@ -31,6 +31,7 @@ The **patch** part changes incrementally at each release.
* certbot: silence letsencrypt deprecation warnings
* elasticsearch: 7.x by default
* evoadmin-web: simpler PHP packages lists
* evomaintenance: extract a config.yyml tasks file
* evocheck: upstream release 21.07
* evolinux-base: alert5 comes after the network
* evolinux-base: force Debian version to buster for Evolix repository (temporary)

View File

@ -0,0 +1,18 @@
---
- assert:
that:
- evomaintenance_api_endpoint is not none
- evomaintenance_api_key is not none
msg: evomaintenance api variables must be set
- name: Configuration is installed
template:
src: evomaintenance.j2
dest: /etc/evomaintenance.cf
owner: root
group: root
mode: "0600"
force: "{{ evomaintenance_force_config | bool }}"
tags:
- evomaintenance

View File

@ -46,15 +46,4 @@
- { src: 'evomaintenance.sh', dest: '/usr/share/scripts/', mode: '0700' }
- { src: 'evomaintenance.tpl', dest: '/usr/share/scripts/', mode: '0600' }
tags:
- evomaintenance
- name: Configuration is installed
template:
src: evomaintenance.j2
dest: /etc/evomaintenance.cf
owner: root
group: root
mode: "0600"
force: "{{ evomaintenance_force_config | bool }}"
tags:
- evomaintenance
- evomaintenance

View File

@ -1,14 +1,5 @@
---
- set_fact:
minifirewall_restart_handler_name: "{{ minifirewall_restart_if_needed | bool | ternary('restart minifirewall', 'restart minifirewall (noop)') }}"
- assert:
that:
- evomaintenance_api_endpoint is not none
- evomaintenance_api_key is not none
msg: evomaintenance api variables must be set
- include: install_package_debian.yml
when:
- not (evomaintenance_install_vendor | bool)
@ -19,6 +10,8 @@
- evomaintenance_install_vendor | bool
- ansible_distribution == "Debian"
- include: config.yml
- include: minifirewall.yml
when:
- evomaintenance_hook_db | bool

View File

@ -1,5 +1,8 @@
---
- set_fact:
minifirewall_restart_handler_name: "{{ minifirewall_restart_if_needed | bool | ternary('restart minifirewall', 'restart minifirewall (noop)') }}"
- name: Is minifirewall installed?
stat:
path: /etc/default/minifirewall