Skip to content

Commit

Permalink
Merge pull request #110 from arineng/eyaml_keydir_location
Browse files Browse the repository at this point in the history
Fixes bug in the latest push from PR #102, that doesn't use the _keysdir path when creating keys
  • Loading branch information
hunner committed Jan 27, 2016
2 parents 15f73f0 + 8519261 commit 4061dc1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions manifests/eyaml.pp
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,25 @@
ensure => directory,
}

$keysdir = dirname($_keysdir)

if ( $create_keys == true ) {
exec { 'createkeys':
user => $owner,
cwd => $confdir,
cwd => $keysdir,
command => 'eyaml createkeys',
path => $cmdpath,
creates => "${confdir}/keys/private_key.pkcs7.pem",
require => [ $hiera_package_depedencies, File["${confdir}/keys"] ],
creates => "${_keysdir}/private_key.pkcs7.pem",
require => [ $hiera_package_depedencies, File[$_keysdir] ],
}

file { "${confdir}/keys/private_key.pkcs7.pem":
file { "${_keysdir}/private_key.pkcs7.pem":
ensure => file,
mode => '0600',
require => Exec['createkeys'],
}

file { "${confdir}/keys/public_key.pkcs7.pem":
file { "${_keysdir}/public_key.pkcs7.pem":
ensure => file,
mode => '0644',
require => Exec['createkeys'],
Expand Down

0 comments on commit 4061dc1

Please sign in to comment.