Commit 538128db authored by Christoph Haas's avatar Christoph Haas

simple automatic tests added

parent c27a0388
......@@ -20,3 +20,4 @@
# - ispmail-dovecot
# - ispmail-webmail
# - ispmail-webmail-apache
- ispmail-tests
---
- name: Remove all mails from john@example.org mailbox
file:
path: /var/vmail/example.org/john
state: absent
- name: Check that all required TCP ports are responding
wait_for:
host: localhost
port: "{{ item }}"
state: started # Port should be open
delay: 0 # No wait before first check (sec)
timeout: 3 # Stop checking after timeout (sec)
ignore_errors: yes
with_items:
- 443
- 80
- 143
- 110
- 25
- 587
- name: Try sending an email to Postfix over SMTP
mail:
host: localhost
port: 25
to: John Smith <john@example.org>
subject: Ansible Test SMTP
body: System {{ ansible_hostname }} has been successfully provisioned.
- name: Try sending an email to Postfix over Submission port
mail:
host: localhost
username: john@example.org
password: summersun
port: 587
to: John Smith <john@example.org>
subject: Ansible Test Submission
body: System {{ ansible_hostname }} has been successfully provisioned.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment