Skip to content

Instantly share code, notes, and snippets.

@SEJeff
Created March 21, 2012 16:59
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save SEJeff/2149546 to your computer and use it in GitHub Desktop.
Save SEJeff/2149546 to your computer and use it in GitHub Desktop.
{% macro postconf(key, value) -%}
postconf-{{ key }}:
cmd:
- run
- name:
- postconf -e {{ key }}='{{ value }}'
- unless: test "x$(postconf -h {{ key }} )" = 'x{{ value }}'
- require:
- pkg: postfix
- watch_in:
- service: postfix
{%- endmacro %}
{% from "postfix/config.sls" import postconf %}
postfix:
pkg:
- latest
service:
- running
{{ postconf('myorigin', grains['fqdn']) }}
{{ postconf('smtpd_banner', '$myhostname ESMTP') }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment