Last active
November 16, 2016 13:48
-
-
Save deric/e1443be4f906e86ec4503bf6427b29d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
puppet module install deric-accounts | |
mkdir -p /etc/puppet/hieradata | |
cat <<EOF > /etc/puppet/hiera.yaml | |
--- | |
:backends: | |
- yaml | |
:hierarchy: | |
- common | |
:yaml: | |
:datadir: /etc/puppet/hieradata | |
EOF | |
cat <<EOF > /etc/puppet/hieradata/common.yaml | |
accounts: | |
user_defaults: | |
authorized_keys_file: '/etc/ssh/%u/authorized_keys' | |
manage_group: false | |
shell: "/bin/bash" | |
accounts::groups: | |
it: | |
ensure: present | |
accounts::users: | |
it: | |
comment: "IT Admin" | |
managehome: true | |
primary_group: 'it' | |
pwhash: '$1$dn3lUNjy$i00w1UuAzN7M/yNtGX0a9/' | |
groups: ['sudo'] | |
jordi: | |
comment: "Jordi Garcia" | |
groups: ['sudo', 'it'] | |
shell: '/bin/bash' | |
EOF | |
puppet apply -e "class{'::accounts': }" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment