diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-06-18 09:45:56 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-06-18 09:45:56 -0300 |
commit | 357609e0b8ace0971efcbdeceabcc96f4097b203 (patch) | |
tree | 0e816eb36cb433edad9df130d4ce222eda5c2842 /manifests/transport_regexp_snippet.pp | |
parent | 8734feea565a6679840a755e6399ad3fb87b7d2c (diff) | |
download | puppet-postfix-357609e0b8ace0971efcbdeceabcc96f4097b203.tar.gz puppet-postfix-357609e0b8ace0971efcbdeceabcc96f4097b203.tar.bz2 |
Migrate transport_regexp and virtual_regexp to concat
Diffstat (limited to 'manifests/transport_regexp_snippet.pp')
-rw-r--r-- | manifests/transport_regexp_snippet.pp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/manifests/transport_regexp_snippet.pp b/manifests/transport_regexp_snippet.pp index 2b13ed1..88c72e1 100644 --- a/manifests/transport_regexp_snippet.pp +++ b/manifests/transport_regexp_snippet.pp @@ -25,7 +25,7 @@ Example usage: define postfix::transport_regexp_snippet ( $ensure = "present", - $source = '', + $source = '', $content = undef ) { @@ -37,29 +37,22 @@ define postfix::transport_regexp_snippet ( fail("Only one of \$source or \$content must specified for postfix::transport_regexp_snippet ${name}") } - if ($value == false) and ($ensure == "present") { - fail("The value parameter must be set when using the postfix::transport_regexp_snippet define with ensure=present.") - } - include postfix::transport_regexp - $snippetfile = "${postfix::transport_regexp::postfix_transport_regexp_snippets_dir}/${name}" - - file { "$snippetfile": + $fragment = "postfix_transport_regexp_${name}" + + concat::fragment { "$fragment": ensure => "$ensure", - mode => 600, - owner => root, - group => 0, - notify => Exec["concat_${postfix::transport_regexp::postfix_merged_transport_regexp}"], + target => '/etc/postfix/transport_regexp', } if $source { - File["$snippetfile"] { + Concat::Fragment["$fragment"] { source => $source, } } else { - File["$snippetfile"] { + Concat::Fragment["$fragment"] { content => $content, } } |