Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Commit

Permalink
fix nssdb::create manage_certdir => false
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hoblitt committed Jan 15, 2014
1 parent 639d62e commit a6e58ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
11 changes: 7 additions & 4 deletions manifests/create.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
owner => $owner_id,
group => $group_id,
}

$require_certdir = File[$certdir]

} else {
$require_certdir = undef
}

file { "${certdir}/password.conf":
Expand All @@ -53,10 +58,9 @@
owner => $owner_id,
group => $group_id,
content => $password,
require => [
File[$certdir],
],
require => $require_certdir,
}

file { [
"${certdir}/cert8.db",
"${certdir}/key3.db",
Expand All @@ -76,7 +80,6 @@
command => "/usr/bin/certutil -N -d ${certdir} -f ${certdir}/password.conf",
creates => ["${certdir}/cert8.db", "${certdir}/key3.db", "${certdir}/secmod.db"],
require => [
File[$certdir],
File["${certdir}/password.conf"],
Class['nssdb'],
]
Expand Down
8 changes: 4 additions & 4 deletions spec/defines/nssdb_create_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
:owner => 'nobody',
:group => 'nobody',
:mode => '0600',
:require => [ 'File[/obsolete/password.conf]', 'Exec[create_nss_db]']
:require => [
'File[/obsolete/password.conf]',
'Exec[create_nss_db]',
]
)
end
end
Expand All @@ -57,7 +60,6 @@
'/obsolete/secmod.db'
],
:require => [
'File[/obsolete]',
'File[/obsolete/password.conf]',
'Class[Nssdb]'
]
Expand Down Expand Up @@ -90,7 +92,6 @@
:group => 'nobody',
:mode => '0660',
:content => 'secret',
:require => 'File[/obsolete]'
)
end
end
Expand Down Expand Up @@ -119,7 +120,6 @@
'/obsolete/secmod.db'
],
:require => [
'File[/obsolete]',
'File[/obsolete/password.conf]',
'Class[Nssdb]'
]
Expand Down

0 comments on commit a6e58ff

Please sign in to comment.