devaos / mailcatcher-formula Goto Github PK
View Code? Open in Web Editor NEWMailCatcher Salt Formula http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
License: Other
MailCatcher Salt Formula http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
License: Other
Hello there, interesting formula here ;)
I tried using it for Centos 6.5
and did not manage to get it running. Opening this here if someone would like to make it work.
Based on the comment here;
{#
# I just guessed at the RedHat settings below. If/when someone actually uses this
# with RedHat, please confirm/fix the settings and remove this comment. Thanks! :)
#}
https://github.com/xclusv/mailcatcher-formula/blob/master/mailcatcher/map.jinja#L1-L4
I tried to fix that, but did not manage to get it running. Turns out this seemed to be a bit better
map.jinja
...
'Debian': {
'dependencies': [
'ruby-dev',
'libsqlite3-dev'
],
'catchmail_bin': '/usr/local/bin/catchmail',
'mailcatcher_bin': '/usr/local/bin/mailcatcher',
'php_conf_d': '/etc/php5/conf.d',
'apache_service': 'apache2',
'nginx_service': 'nginx',
'smtp_service': 'exim4',
},
'RedHat': {
'dependencies': [
'ruby-devel',
'rubygems',
'sqlite-devel'
],
'catchmail_bin': '/usr/local/bin/catchmail',
'mailcatcher_bin': '/usr/local/bin/mailcatcher',
'php_conf_d': '/etc/php5/conf.d',
'apache_service': 'httpd',
'nginx_service': 'nginx',
'smtp_service': 'exim4',
},
...
init.sls
...
mailcatcher-dependencies:
pkg.installed:
- names:
{% for dependency in mailcatcher.dependencies %}
- {{ dependency }}
{% endfor %}
...
But I think centos requires more than this, in fact, ruby-devel
won't provide gem
alone, so I also added 'rubygems'
. My centos vm has alot of things already installed, but here are more details on installing ruby on centos
I also think sqlite-devel
is the equivalent of libsqlite3-dev
, but I can't confirm this yet.
Here's what I get atm when running sudo salt-call state.sls dev.mailcatcher -l debug
...
[INFO ] Executing command 'gem list mailcatcher' in directory '/root'
[INFO ] Executing command 'gem install mailcatcher --no-rdoc --no-ri' in directory '/root'
[ERROR ] Command 'gem install mailcatcher --no-rdoc --no-ri' failed with return code: 1
[ERROR ] stderr: ERROR: Error installing mailcatcher:
i18n requires Ruby version >= 1.9.3.
[ERROR ] Could not install gem.
[INFO ] Completed state [mailcatcher] at time 00:56:24.540240
[INFO ] Running state [exim4] at time 00:56:24.541155
[INFO ] Executing state service.dead for exim4
[INFO ] The named service exim4 is not available
[INFO ] Completed state [exim4] at time 00:56:24.543259
[INFO ] Running state [/etc/init.d/mailcatcher] at time 00:56:24.543942
[INFO ] Executing state file.managed for /etc/init.d/mailcatcher
[DEBUG ] Jinja search path: ['/vagrant/saltconf/salt', '/vagrant/saltconf/formulas/mailcatcher-formula']
[INFO ] File /etc/init.d/mailcatcher is in the correct state
[INFO ] Completed state [/etc/init.d/mailcatcher] at time 00:56:24.561452
[DEBUG ] Loaded no_out as virtual quiet
[DEBUG ] Loaded json_out as virtual json
[DEBUG ] Loaded yaml_out as virtual yaml
[DEBUG ] Loaded pprint_out as virtual pprint
local:
----------
ID: mailcatcher-dependencies
Function: pkg.installed
Name: rubygems
Result: True
Comment: Package rubygems is already installed
Changes:
----------
ID: mailcatcher-dependencies
Function: pkg.installed
Name: sqlite-devel
Result: True
Comment: Package sqlite-devel is already installed
Changes:
----------
ID: mailcatcher-dependencies
Function: pkg.installed
Name: ruby-devel
Result: True
Comment: Package ruby-devel is already installed
Changes:
----------
ID: mailcatcher-gem
Function: gem.installed
Name: mailcatcher
Result: False
Comment: Could not install gem.
Changes:
----------
ID: mailcatcher-kill_smtp
Function: service.dead
Name: exim4
Result: True
Comment: The named service exim4 is not available
Changes:
----------
ID: mailcatcher
Function: file.managed
Name: /etc/init.d/mailcatcher
Result: True
Comment: File /etc/init.d/mailcatcher is in the correct state
Changes:
----------
ID: mailcatcher
Function: service.running
Result: False
Comment: One or more requisite failed
Changes:
Summary
------------
Succeeded: 5
Failed: 2
------------
Total: 7
Can't be easy with centos. Seems like I need to compile ruby myself. After a quick seach, I'll see if I can get go-mailhog working instead, seems a bit easier to setup ;)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.