Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add show_diff parameter to postfix::conffile #226

Merged
merged 1 commit into from
Aug 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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'],
}

}