Skip to content

Commit

Permalink
Merge pull request #188 from bdandoy/user
Browse files Browse the repository at this point in the history
Ensure user group exists
  • Loading branch information
nmaludy committed Sep 15, 2017
2 parents 69b4e45 + 01a2a65 commit a4bccf8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
cached repos. #182
Contributed by @ruriky

- Ensure group creation. #188 (Enhancement)
Contributed by @bdandoy

- Added more puppet-lint checks. #181
Contributed by @bdandoy

Expand Down
12 changes: 8 additions & 4 deletions manifests/user.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
$_packs_group_name = $st2::params::packs_group_name
$_ssh_dir = "/home/${name}/.ssh"

ensure_resource('group', $_packs_group_name, {
'ensure' => present,
})

if $create_sudo_entry {
if !defined(Class['::sudo']) and !defined(Class['sudo']) {
class { '::sudo':
Expand All @@ -55,6 +51,14 @@
})
}

ensure_resource('group', $_packs_group_name, {
'ensure' => present,
})

ensure_resource('group', $name, {
'ensure' => present,
})

ensure_resource('user', $name, {
'ensure' => present,
'shell' => '/bin/bash',
Expand Down

0 comments on commit a4bccf8

Please sign in to comment.