1
0
mirror of https://github.com/krislamo/puppet-acme_vault synced 2024-09-19 20:40:36 +00:00

use collected / virtual resources for group membership

This commit is contained in:
Bob Belnap 2021-07-02 11:05:06 -04:00
parent bcc92add25
commit ed0fc67379
2 changed files with 15 additions and 5 deletions

View File

@ -41,12 +41,22 @@ class acme_vault::common (
mode => '0750',
}
group { $group:
ensure => present,
members => $group_members,
system => true,
# group membership is handled through collected virtual resources. This
# allows other modules/profiles to add members to the group, for services
# that require access to the certs
@group { $group:
ensure => present,
system => true,
tag => 'acme_vault_group',
}
# include lines similar to this in your own modules to add members to the
# group. We use this method here to add the group_members paramater, but
# it will work the same in any module.
Group <| tag == 'acme_vault_group' |> { members +> $group_members }
# vault module isn't too flexible for install only, just copy in binary
# would be nice if this worked!
#class { '::vault::install':

View File

@ -3,7 +3,7 @@ class acme_vault::params {
# settings for acme user
$user = 'acme'
$group = 'acme'
$group_members = ['apache']
$group_members = []
$home_dir = '/home/acme_vault'
$contact_email = ''
$domains = undef