Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/users/manifests/init.pp

Issue 29323115: Noissue - Allow for specifying a users::user's list of groups (Closed)
Patch Set: Created July 30, 2015, 3:52 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « modules/private-stub/manifests/users.pp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 class users { 1 class users {
2 define user ( 2 define user (
3 $user_name = $title, 3 $user_name = $title,
4 $authorized_keys, 4 $authorized_keys,
5 $password = undef, 5 $password = undef,
6 $sudo = false 6 $groups = [],
7 ) { 7 ) {
8 user {$user_name: 8 user {$user_name:
9 home => "/home/${user_name}", 9 home => "/home/${user_name}",
10 shell => "/bin/bash", 10 shell => "/bin/bash",
11 managehome => true, 11 managehome => true,
12 password => $password, 12 password => $password,
13 groups => $sudo ? { 13 groups => $groups,
14 true => 'sudo',
15 default => undef
16 }
17 } 14 }
18 15
19 file {"/home/${user_name}/.ssh": 16 file {"/home/${user_name}/.ssh":
20 ensure => directory, 17 ensure => directory,
21 owner => $user_name, 18 owner => $user_name,
22 mode => 0700, 19 mode => 0700,
23 require => User[$user_name] 20 require => User[$user_name]
24 } 21 }
25 22
26 file {"/home/${user_name}/.ssh/authorized_keys": 23 file {"/home/${user_name}/.ssh/authorized_keys":
(...skipping 12 matching lines...) Expand all
39 } 36 }
40 37
41 file {'/etc/sudoers.d/puppet': 38 file {'/etc/sudoers.d/puppet':
42 ensure => present, 39 ensure => present,
43 owner => root, 40 owner => root,
44 group => root, 41 group => root,
45 mode => 0440, 42 mode => 0440,
46 source => 'puppet:///modules/users/sudoers-puppet' 43 source => 'puppet:///modules/users/sudoers-puppet'
47 } 44 }
48 } 45 }
OLDNEW
« no previous file with comments | « modules/private-stub/manifests/users.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld