Skip to content

Commit

Permalink
New instance parameter 'additional_groups'
Browse files Browse the repository at this point in the history
User can define additional groups for instance and fenced users.
Multiple groups can be defined as an array.
  • Loading branch information
ruriky committed Nov 10, 2017
1 parent 5763b24 commit 1007b49
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ db2::install { '11.1':
* `instance_user_uid`: UID of the instance user
* `instance_user_gid`: GID of the instance user
* `instance_user_home`: Home directory of the instance user
* `additional_groups`: An array of additional groups for instance and fence users (optional, default: undef)
* `type`: Type of product this instance is for (default: ese)
* `auth`: Type of auth for this instance (default: server)
* `users_forcelocal`: Force the creation of instance and fence users to be local, true or false. (default: undef)
Expand Down
3 changes: 3 additions & 0 deletions manifests/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
$instance_user_uid = undef,
$instance_user_gid = undef,
$instance_user_home = undef,
$additional_groups = undef,
$users_forcelocal = undef,
$port = undef,
$type = 'ese',
Expand All @@ -32,6 +33,7 @@
home => $fence_user_home,
forcelocal => $users_forcelocal,
managehome => true,
groups => $additional_groups,
}
}
}
Expand All @@ -43,6 +45,7 @@
home => $instance_user_home,
forcelocal => $users_forcelocal,
managehome => true,
groups => $additional_groups,
}
}

Expand Down
5 changes: 4 additions & 1 deletion spec/defines/instance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,22 @@
:fence_user_uid => '1002',
:fence_user_gid => 'db2fencg',
:fence_user_home => '/db2/fence',
:additional_groups => 'db2group',
}}
it do
is_expected.to contain_user('db2inst').with(
:uid => '1001',
:gid => 'db2instg',
:home => '/db2/inst'
:home => '/db2/inst',
:groups => 'db2group',
)
end
it do
is_expected.to contain_user('db2fence').with(
:uid => '1002',
:gid => 'db2fencg',
:home => '/db2/fence',
:groups => 'db2group',
)
end
end
Expand Down

0 comments on commit 1007b49

Please sign in to comment.