Skip to content

Commit

Permalink
Add show_diff parameter to postfix::conffile (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock authored and raphink committed Aug 23, 2019
1 parent e6c279d commit 7407878
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions manifests/conffile.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
# [*options*]
# Hash with options to use in the template
#
# [*show_diff*]
# Boolean that sets File show_diff parameter
#
# == Usage:
# postfix::conffile { 'ldapoptions.cf':
# options => {
Expand All @@ -44,12 +47,13 @@
# }
#
define postfix::conffile (
Enum['present', 'absent', 'directory'] $ensure = 'present',
Variant[Array[String], String, Undef] $source = undef,
Optional[String] $content = undef,
Stdlib::Absolutepath $path = "/etc/postfix/${name}",
String $mode = '0640',
Hash $options = {},
Enum['present', 'absent', 'directory'] $ensure = 'present',
Variant[Array[String], String, Undef] $source = undef,
Optional[String] $content = undef,
Stdlib::Absolutepath $path = "/etc/postfix/${name}",
String $mode = '0640',
Hash $options = {},
Boolean $show_diff = true,
) {
include ::postfix::params

Expand Down Expand Up @@ -79,16 +83,17 @@
}

file { "postfix conffile ${name}":
ensure => $ensure,
path => $path,
mode => $mode,
owner => 'root',
group => 'postfix',
seltype => $postfix::params::seltype,
require => Package['postfix'],
source => $source,
content => $manage_content,
notify => Service['postfix'],
ensure => $ensure,
path => $path,
mode => $mode,
owner => 'root',
group => 'postfix',
seltype => $postfix::params::seltype,
require => Package['postfix'],
source => $source,
content => $manage_content,
show_diff => $show_diff,
notify => Service['postfix'],
}

}

0 comments on commit 7407878

Please sign in to comment.