Files
ansible_role_mail/molecule/default/verify.yml

38 lines
969 B
YAML
Raw Permalink Normal View History

2026-03-11 11:44:59 -03:00
#SPDX-License-Identifier: GPL-3.0-only
---
- name: Verify
hosts: all
tasks:
- name: Gather service facts
ansible.builtin.service_facts:
- name: Assert postfix service is present
ansible.builtin.assert:
that:
- "'postfix.service' in ansible_facts.services"
- name: Assert dovecot service is present
ansible.builtin.assert:
that:
- "'dovecot.service' in ansible_facts.services"
- name: Check postfix main.cf exists
ansible.builtin.stat:
path: /etc/postfix/main.cf
register: postfix_main_cf
- name: Assert postfix main.cf exists
ansible.builtin.assert:
that:
- postfix_main_cf.stat.exists
- name: Check dovecot.conf exists
ansible.builtin.stat:
path: /etc/dovecot/dovecot.conf
register: dovecot_conf
- name: Assert dovecot.conf exists
ansible.builtin.assert:
that:
- dovecot_conf.stat.exists