Skip to content

Commit

Permalink
Allow unit file group customization
Browse files Browse the repository at this point in the history
  • Loading branch information
jplana committed Aug 9, 2022
1 parent 9752685 commit 57c88aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@
$service_hasrestart = $docker::params::service_hasrestart,
$run_init_template = $docker::params::run_init_template,
$run_init_file_mode = $docker::params::run_init_file_mode,
$run_init_file_group = $docker::params::run_init_file_group,
) inherits docker::params {

validate_string($version)
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
$compose_version = '1.9.0'
$compose_install_path = '/usr/local/bin'
$run_init_file_mode = undef
$run_init_file_group = undef

case $::osfamily {
'Debian' : {
Expand Down
7 changes: 6 additions & 1 deletion manifests/run.pp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
$syslog_identifier = undef,
$init_template = $docker::run_init_template,
$xinit_file_mode = $docker::run_init_file_mode,
$xinit_file_group = $docker::run_init_file_group,
) {
include docker::params
if ($socket_connect != []) {
Expand All @@ -124,7 +125,11 @@
$docker_command = $docker::params::docker_command
}
$service_name = $docker::params::service_name
$docker_group = $docker::params::docker_group

$docker_group = $xinit_file_group ? {
undef => $docker::params::docker_group,
default => $xinit_file_group,
}

validate_re($image, '^[\S]*$')
validate_re($title, '^[\S]*$')
Expand Down

0 comments on commit 57c88aa

Please sign in to comment.