diff options
author | mh <mh@immerda.ch> | 2012-02-16 16:51:56 +0100 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2012-04-07 13:56:47 -0300 |
commit | 59010a1c304801db6423f67d656399478fc603f0 (patch) | |
tree | 2ff29f6c26451f2dd62f53a3a5abb5b09bef7ab4 /manifests/definitions/header_checks_snippet.pp | |
parent | 462db65ec48b6398c9a04a88cc4c197eb73f34fa (diff) | |
download | puppet-postfix-59010a1c304801db6423f67d656399478fc603f0.tar.gz puppet-postfix-59010a1c304801db6423f67d656399478fc603f0.tar.bz2 |
put classes and defines in the proper place
To take advantage of puppet's autoloading feature, which will be
mandatory sooner or later. We move all the files in their appropriate
place.
Diffstat (limited to 'manifests/definitions/header_checks_snippet.pp')
-rw-r--r-- | manifests/definitions/header_checks_snippet.pp | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/manifests/definitions/header_checks_snippet.pp b/manifests/definitions/header_checks_snippet.pp deleted file mode 100644 index 454d219..0000000 --- a/manifests/definitions/header_checks_snippet.pp +++ /dev/null @@ -1,67 +0,0 @@ -/* -== Definition: postfix::header_checks_snippet - -Adds a header_checks snippets to /etc/postfix/header_checks. -See the postfix::header_checks class for details. - -Parameters: -- *source* or *content*: source or content of the header_checks snippet -- *ensure*: present (default) or absent - -Requires: -- Class["postfix"] - -Example usage: - - node "toto.example.com" { - include postfix - postfix::header_checks { - 'wrong_date': content => 'FIXME'; - 'bla': source => 'puppet:///files/etc/postfix/header_checks.d/bla'; - } - } - -*/ - -define postfix::header_checks_snippet ( - $ensure = "present", - $source = '', - $content = undef -) { - - if $source == '' and $content == undef { - fail("One of \$source or \$content must be specified for postfix::header_checks_snippet ${name}") - } - - if $source != '' and $content != undef { - fail("Only one of \$source or \$content must specified for postfix::header_checks_snippet ${name}") - } - - if ($value == false) and ($ensure == "present") { - fail("The value parameter must be set when using the postfix::header_checks_snippet define with ensure=present.") - } - - include postfix::header_checks - - $snippetfile = "${postfix::header_checks::postfix_header_checks_snippets_dir}/${name}" - - file { "$snippetfile": - ensure => "$ensure", - mode => 600, - owner => root, - group => 0, - notify => Exec["concat_${postfix::header_checks::postfix_merged_header_checks}"], - } - - if $source { - File["$snippetfile"] { - source => $source, - } - } - else { - File["$snippetfile"] { - content => $content, - } - } - -} |