Update sanity checks

This commit is contained in:
Sven Velt 2021-02-18 13:00:21 +01:00
parent 452044c988
commit 4f42a80004
2 changed files with 7 additions and 0 deletions

View file

@ -4,6 +4,7 @@
that:
- monitored_dont|default(False) != True
- monitored_by_nrpe == True or monitored_by_ssh == True
fail_msg: "Neither monitored_by_nrpe nor monitored_by_ssh set to True"
- name: Gather OS Specific Variables
include_vars: "{{ item }}"

View file

@ -1,4 +1,10 @@
---
- name: Sanity check
assert:
that:
- monitored_ssh_key_files|length > 0
fail_msg: "List of SSH keys ('monitored_ssh_key_files') is empty!"
- name: Copy SSH authorized_keys for monitoring user
authorized_key:
user: "{{ monitored_user }}"