diff options
| author | mh <mh@immerda.ch> | 2012-02-16 16:58:09 +0100 | 
|---|---|---|
| committer | mh <mh@immerda.ch> | 2012-02-16 16:58:09 +0100 | 
| commit | 2c86670a9233ee62d16b16730218994a1fe7eb9b (patch) | |
| tree | 858e1a576863678f675b6be0f5f45b9b77f01d04 /manifests/hash.pp | |
| parent | 77578b93bd98bf0bf9cf69e4fa8da75dcf9c236d (diff) | |
| download | puppet-postfix-2c86670a9233ee62d16b16730218994a1fe7eb9b.tar.gz puppet-postfix-2c86670a9233ee62d16b16730218994a1fe7eb9b.tar.bz2 | |
Use proper variable scope
Facts should be addressed with $::fqdn and so on.
Diffstat (limited to 'manifests/hash.pp')
| -rw-r--r-- | manifests/hash.pp | 24 | 
1 files changed, 4 insertions, 20 deletions
| diff --git a/manifests/hash.pp b/manifests/hash.pp index c8bb7c7..6e2012f 100644 --- a/manifests/hash.pp +++ b/manifests/hash.pp @@ -29,23 +29,7 @@ Example usage:  */  define postfix::hash ($ensure="present", $source = false) { - -  # selinux labels differ from one distribution to another -  case $operatingsystem { - -    RedHat, CentOS: { -      case $lsbmajdistrelease { -        "4":     { $postfix_seltype = "etc_t" } -        "5":     { $postfix_seltype = "postfix_etc_t" } -        default: { $postfix_seltype = undef } -      } -    } - -    default: { -      $postfix_seltype = undef -    } -  } - +  include ::postfix    case $source {      false: {        file {"${name}": @@ -53,7 +37,7 @@ define postfix::hash ($ensure="present", $source = false) {          mode    => 600,          owner   => root,          group   => root, -        seltype => $postfix_seltype, +        seltype => $postfix::postfix_seltype,          require => Package["postfix"],        }      } @@ -64,7 +48,7 @@ define postfix::hash ($ensure="present", $source = false) {          owner   => root,          group   => root,          source  => $source, -        seltype => $postfix_seltype, +        seltype => $postfix::postfix_seltype,          require => Package["postfix"],        }      } @@ -74,7 +58,7 @@ define postfix::hash ($ensure="present", $source = false) {      ensure  => $ensure,      mode    => 600,      require => [File["${name}"], Exec["generate ${name}.db"]], -    seltype => $postfix_seltype, +    seltype => $postfix::postfix_seltype,    }    exec {"generate ${name}.db": | 
