From 7407878bac6676c5c1ab8733febf3f6922711b31 Mon Sep 17 00:00:00 2001 From: treydock <tdockendorf@osc.edu> Date: Fri, 23 Aug 2019 03:48:32 -0400 Subject: [PATCH] Add show_diff parameter to postfix::conffile (#226) --- manifests/conffile.pp | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/manifests/conffile.pp b/manifests/conffile.pp index 896d89a0..2b823523 100644 --- a/manifests/conffile.pp +++ b/manifests/conffile.pp @@ -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 => { @@ -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 @@ -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'], } }