Skip to content

Instantly share code, notes, and snippets.

@frankdejonge
Created January 3, 2014 07:14
Show Gist options
  • Save frankdejonge/8234108 to your computer and use it in GitHub Desktop.
Save frankdejonge/8234108 to your computer and use it in GitHub Desktop.
Ansible setup for MailCatcher.me
---
- name: Commmon | MailUtils
apt: pkg=mailutils state=latest
- name: Commmon | sqlite3
apt: pkg=sqlite3 state=latest
- name: Commmon | libsqlite3-dev
apt: pkg=libsqlite3-dev state=latest
- name: Common | Install rubygems package
apt: pkg=rubygems state=installed
- name: MailCatcher | Install MailCatcher
action: command gem install mailcatcher creates=/usr/local/bin/mailcatcher
- name: MailCatcher | Configure PHP Email
command: sed -ir "s/;\?sendmail_path =.*/sendmail_path = \/usr\/bin\/env \/usr\/local\/bin\/catchmail/" /etc/php5/apache2/php.ini
command: sed -ir "s/;\?sendmail_path =.*/sendmail_path = \/usr\/bin\/env \/usr\/local\/bin\/catchmail/" /etc/php5/cli/php.ini
- name: MailCatcher | Kill MailCatcher
command: pkill mailcatcher
ignore_errors: yes
- name: MailCatcher | Run MailCatcher
command: mailcatcher --ip=0.0.0.0
@yauh
Copy link

yauh commented Feb 28, 2014

I created a role for mailcatcher, perhaps this is helpful for you as well. https://galaxy.ansible.com/list#/roles/426

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment