diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-06-14 23:03:10 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-06-14 23:07:40 +0200 |
commit | f0363cfd5e1dcf90b6f57199c43b67d2a75dfe59 (patch) | |
tree | 07c40175ad9ef37f3f4c7fb5132703287c7634a8 /manifests/puppetserver.pp | |
parent | Puppetserver: lint cleanup. (diff) | |
download | profiles-f0363cfd5e1dcf90b6f57199c43b67d2a75dfe59.tar.gz profiles-f0363cfd5e1dcf90b6f57199c43b67d2a75dfe59.tar.xz |
Puppetserver: setup eyaml.
Diffstat (limited to 'manifests/puppetserver.pp')
-rw-r--r-- | manifests/puppetserver.pp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/manifests/puppetserver.pp b/manifests/puppetserver.pp index e8f5a1a..3d1a32c 100644 --- a/manifests/puppetserver.pp +++ b/manifests/puppetserver.pp @@ -17,6 +17,8 @@ class profiles::puppetserver ( } ] }, + Stdlib::Absolutepath $public_key = '/etc/puppetlabs/puppet/eyaml/public_key.pkcs7.pem', + Stdlib::Absolutepath $private_key = '/etc/puppetlabs/puppet/eyaml/private_key.pkcs7.pem', ) { if defined(Class['profiles::puppetagent']) { @@ -82,4 +84,19 @@ class profiles::puppetserver ( 'header' => '# This file is managed by puppet', }), } + + # Distro version should work fine + ensure_packages(['hiera-eyaml']) + + # NOTE If eyaml was installed throuh `puppetserver gem install %` + # then it ends up in `/opt/puppetlabs/puppet/bin`. + exec { 'Create eyaml keys': + command => [ + 'eyaml', 'createkeys', + '--pkcs7-public-key', $public_key, + '--pkcs7-private-key', $private_key, + ], + creates => $private_key, + path => ['/bin', '/usr/bin'], + } } |