ansible-nas/roles/healthchecks.io/molecule/default/verify_stopped.yml
Anarion 4960286632
First portion of migration
freshrss, get_iplayer, gitlab, glances, gotify, guacamole, healthchecks.io
2023-03-08 21:47:39 +01:00

19 lines
615 B
YAML

---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
ansible.builtin.include_vars:
file: ../../defaults/main.yml
- name: Check cron job file
ansible.builtin.fetch:
src: /var/spool/cron/crontabs/root
dest: /tmp/fetched
- name: Check if cron job does not exist
ansible.builtin.assert:
that: "not lookup('file', '/tmp/fetched/instance/var/spool/cron/crontabs/root') is search('healthchecks.io')"
fail_msg: "Cron job 'healthchecks.io' still exists!"
success_msg: "Cron job 'healthchecks.io' does not exist!"