Created
May 9, 2016 13:40
-
-
Save dlundgren/3d4d616edfec95d4ab66d3156da1df1b to your computer and use it in GitHub Desktop.
vagrant+ansible mailhog php setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| description "Mailhog" | |
| start on runlevel [2345] | |
| stop on runlevel [!2345] | |
| respawn | |
| pre-start script | |
| exec su - vagrant -c "/usr/bin/env /usr/local/bin/mailhog > /dev/null 2>&1 &" | |
| end script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: Download MailHog | |
| get_url: | |
| url: https://github.com/mailhog/MailHog/releases/download/v0.1.8/MailHog_linux_amd64 | |
| dest: /usr/local/bin/mailhog | |
| mode: 755 | |
| - name: Download mhsendmail | |
| get_url: | |
| url: https://github.com/mailhog/mhsendmail/releases/download/v0.1.9/mhsendmail_linux_amd64 | |
| dest: /usr/local/bin/mhsendmail | |
| mode: 755 | |
| - name: Configure MailHog | |
| copy: | |
| src: files/mailhog.conf | |
| dest: /etc/init/mailhog.conf | |
| - name: Start mailhog | |
| service: | |
| name: mailhog | |
| state: started | |
| enabled: yes | |
| - name: Configure PHP to use mailhog | |
| copy: | |
| src: files/php-sendmail.ini | |
| dest: /etc/php5/mods-available/mhsendmail.ini | |
| - name: Activate mhsendmail in PHP | |
| command: php5enmod mhsendmail |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sendmail_path = /usr/local/bin/mhsendmail |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment