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

Disable diff for sssd.conf as it may contain passwords #1

Merged
merged 1 commit into from
Mar 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
}

file { '/etc/sssd/sssd.conf':
ensure => 'file',
owner => 'root',
group => 'root',
mode => '0600',
notify => Service['sssd'],
content => template('sssd/sssd.conf.erb'),
ensure => 'file',
owner => 'root',
group => 'root',
mode => '0600',
notify => Service['sssd'],
content => template('sssd/sssd.conf.erb'),
show_diff => $sssd::show_diff,
}

file { '/etc/sssd/conf.d':
Expand Down
3 changes: 3 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
# Configs hash that defines /etc/sssd/sssd.conf
# @param configs_merge
# Sets if configs hash should be merged from Hiera
# @param show_diff
# Boolean that determines if files should support showing diff
#
class sssd (
String $package_ensure = 'latest',
Variant[String, Array] $package_name = $sssd::params::package_name,
Array $extra_packages = $sssd::params::extra_packages,
Hash $configs = $sssd::params::configs,
Boolean $configs_merge = false,
Boolean $show_diff = false,
) inherits sssd::params {

contain 'sssd::install'
Expand Down
11 changes: 6 additions & 5 deletions spec/classes/sssd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@

it do
should contain_file('/etc/sssd/sssd.conf').with({
'ensure' => 'file',
'owner' => 'root',
'group' => 'root',
'mode' => '0600',
'notify' => 'Service[sssd]',
'ensure' => 'file',
'owner' => 'root',
'group' => 'root',
'mode' => '0600',
'notify' => 'Service[sssd]',
'show_diff' => 'false',
})
end

Expand Down