Last active
December 23, 2016 23:31
-
-
Save evilbulgarian/b76ba67c862789850d8af961b1608e10 to your computer and use it in GitHub Desktop.
This file contains 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
users: | |
- name: asdf | |
fullname: asdf asdf | |
email: techops@easdfa | |
uid: 20000 | |
gid: 20000 | |
shell: /bin/bash | |
groups: | |
- www-data | |
- asdf | |
shadow: '' | |
sshpriv: | | |
-----BEGIN RSA PRIVATE KEY----- | |
DmE0M5swLdYq/51oUd2P5192syBghcPEZt72gX6dsuLyR/cvHfDJ | |
-----END RSA PRIVATE KEY----- | |
sshpub: ssh-rsa xadsfasdfasdfasdf | |
{% if 'sshpriv' in user %} | |
user_{{user.name}}_sshpriv: | |
file.managed: | |
- name: /home/{{user.name}}/.ssh/id_rsa | |
- user: {{user.name}} | |
- group: {{user.name}} | |
- mode: 0600 | |
- contents_pillar: {{user.sshpriv}} | |
{% endif %} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment