Skip to content

Instantly share code, notes, and snippets.

@mjinks
Created May 12, 2015 21:43
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 mjinks/3bb4ddf5fb58b626b279 to your computer and use it in GitHub Desktop.
Save mjinks/3bb4ddf5fb58b626b279 to your computer and use it in GitHub Desktop.
jdoe:
group.present:
- gid: 10010
user.present:
# - gid_from_name=True
- fullname: John Doe
- shell: /bin/bash
- home: /home/jdoe
- uid: 10010
- gid: 10010
- groups:
- wheel
- storage
- games
ssh_auth.present:
- source: salt://ssh_keys/mjinks-rsa.pub
...which yields:
[DEBUG ] Fetching file from saltenv 'base', ** attempting ** 'salt://ssh_keys/init.sls'
[DEBUG ] Decrypting the current master AES key
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
local:
Data failed to compile:
----------
No matching sls found for 'ssh_keys' in env 'base'
@gravyboat
Copy link

jdoe_group:
  group.present:
    - name: jdoe
    - gid: 10010

jdoe_user:
  user.present:
    - name: jdoe
    - fullname: John Doe
    - shell: /bin/bash
    - home: /home/jdoe
    - uid: 10010
    - gid: 10010
    - groups:
      - wheel
      - storage
      - games

jdoe_ssh:
  ssh_auth.present:
    - user: jdoe
    - source: salt://ssh_keys/mjinks-rsa.pub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment