Install Mailhog with Ansible. Default HTTP port is 8025
---
- hosts: 127.0.0.1
connection: local
vars:
mailhog_binary_url: https://github.com/mailhog/MailHog/releases/download/v0.1.6/MailHog_linux_amd64
roles:
- { role: geerlingguy.mailhog }
#! /bin/bash
# Only install if not exists
if [ ! -x /usr/bin/ansible ]; then
echo ">>> Installing ansible";
#apt-get install software-properties-common
apt-add-repository ppa:ansible/ansible -y
apt-get update
apt-get install ansible -y
fi
sudo ansible-galaxy install geerlingguy.mailhog
ansible-playbook mailhog.yaml -s -K