Skip to content

Instantly share code, notes, and snippets.

@evilbulgarian
Last active December 23, 2016 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evilbulgarian/b76ba67c862789850d8af961b1608e10 to your computer and use it in GitHub Desktop.
Save evilbulgarian/b76ba67c862789850d8af961b1608e10 to your computer and use it in GitHub Desktop.
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