Skip to content

Commit

Permalink
Merge pull request puppetlabs#841 from traylenator/users
Browse files Browse the repository at this point in the history
New create_user parameter on main class
  • Loading branch information
petergmurphy authored Jun 20, 2022
2 parents f7df65a + c01ee37 commit b256772
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 5 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# @summary
# @summary Configuration for docker
# @api private
#
class docker::config {
if $facts['os']['family'] != 'windows' {
$docker::docker_users.each |$user| {
docker::system_user { $user: }
docker::system_user { $user:
create_user => $docker::create_user,
}
}
} else {
$docker::docker_users.each |$user| {
Expand Down
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@
# @param docker_users
# Specify an array of users to add to the docker group
#
# @param create_user
# If `true` the list of `docker_users` will be created as well as added to the docker group
#
# @param docker_group
# Specify a string for the docker group
#
Expand Down Expand Up @@ -446,6 +449,7 @@
Optional[String] $package_source = $docker::params::package_source,
Optional[String] $service_name = $docker::params::service_name,
Array $docker_users = [],
Boolean $create_user = true,
String $docker_group = $docker::params::docker_group,
Array $daemon_environment_files = [],
Optional[Variant[String,Hash]] $repo_opt = $docker::params::repo_opt,
Expand Down
1 change: 1 addition & 0 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
'apt_source_pin_level' => defaults['apt_source_pin_level'],
'bip' => defaults['bip'],
'bridge' => defaults['bridge'],
'create_user' => true,
'daemon_environment_files' => [],
'default_gateway_ipv6' => defaults['default_gateway_ipv6'],
'default_gateway' => defaults['default_gateway'],
Expand Down

0 comments on commit b256772

Please sign in to comment.