Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
deric committed Mar 30, 2016
1 parent df8b7ea commit c376e8f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
13 changes: 6 additions & 7 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,17 @@

create_resources(accounts::group, $primary_groups)

class { 'accounts::users':
class { '::accounts::users':
manage => $manage_users,
users => $merged_users,
defaults => $user_defaults,
before => Anchor['accounts::primary_groups_created'],
}

# first create users, then assign users to the groups
class { 'accounts::groups':
manage => $manage_groups,
users => $merged_users,
groups => $merged_groups,
#require => Class['accounts::users']
# each user resource will have dependency on a group, if needed
class { '::accounts::groups':
manage => $manage_groups,
users => $merged_users,
groups => $merged_groups,
}
}
11 changes: 5 additions & 6 deletions manifests/user.pp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
$home_dir = $home
} else {
$home_dir = $username ? {
root => '/root',
'root' => '/root',
default => "/home/${username}",
}
}
Expand All @@ -71,7 +71,7 @@
User <| title == $username |> { home => $home_dir }

case $ensure {
absent: {
'absent': {
if $managehome == true {
exec { "rm -rf ${home_dir}":
path => [ '/bin', '/usr/bin' ],
Expand Down Expand Up @@ -103,12 +103,11 @@
group { $primary_group:
ensure => absent,
gid => $real_gid,
require => User[$username]
require => User[$username],
}
}
}

present: {
'present': {
# prior to Puppet 3.6 `purge_ssh_keys` is not supported
if versioncmp($::puppetversion, '3.6.0') < 0 {
user { $username:
Expand Down Expand Up @@ -168,7 +167,7 @@
}

Ssh_authorized_key {
require => File[$authorized_keys]
require => File[$authorized_keys],
}
}

Expand Down

0 comments on commit c376e8f

Please sign in to comment.