Skip to content

Commit 4d422f6

Browse files
committed
Created example accounts profile and updated Puppetfile to include puppetlabs/accounts
1 parent 3cb1995 commit 4d422f6

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

Puppetfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ mod "puppetlabs/stdlib", '4.11.0'
77
mod "puppetlabs/concat", '2.1.0'
88
mod "hunner/hiera", '2.0.1'
99
mod "npwalker/pe_code_manager_webhook", '1.0.8'
10+
mod "puppetlabs/accounts", '1.0.0'
1011

1112
# Modules from Github using various references
1213
# Further examples: https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#examples

site/profile/manifests/accounts.pp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This class wraps the puppetlabs/accounts module and the native
2+
# group type to create accounts and groups from hiera.
3+
#
4+
# Enteries in Hiera should look like this:
5+
#
6+
# accounts_hash:
7+
# bob:
8+
# uid: '4001'
9+
# gid: '4001'
10+
# shell: '/bin/bash'
11+
# password: '!!'
12+
# sshkeys:
13+
# - 'ssh-rsa AAAA...'
14+
# locked: false
15+
# sue:
16+
# uid: '4002'
17+
# gid: '4002'
18+
# shell: '/bin/ksh'
19+
# password: '!!'
20+
# sshkeys:
21+
# - 'ssh-rsa BBBB...'
22+
# locked: false
23+
class profile::accounts (
24+
$accounts = hiera_hash('accounts_hash',{}),
25+
$groups = hiera_hash('groups_hash',{}),
26+
) {
27+
28+
29+
create_resources(accounts::user, $accounts)
30+
create_resources(group, $groups)
31+
}

0 commit comments

Comments
 (0)