-
Notifications
You must be signed in to change notification settings - Fork 1
/
users_vm.sls
49 lines (41 loc) · 1.23 KB
/
users_vm.sls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
jon:
user.present:
- fullname: Jon Clayton
- password: {{ salt['pillar.get']('secrets:jon') }}
- shell: /bin/bash
- home: /home/jon
- groups:
- sudo
ssh_auth.present:
- user: jon
- enc: ed25519
- config: '%h/.ssh/authorized_keys'
- names:
- AAAAC3NzaC1lZDI1NTE5AAAAIBNPXegfN6YaATTyrq9ow5didiMvG+CjOEzmK6+vWomH
- AAAAC3NzaC1lZDI1NTE5AAAAIJjM78UyIQWNbMsca2qafeshPflijH8HbbsKuTTZqB1F
- AAAAC3NzaC1lZDI1NTE5AAAAIJpASWQUj+UkSv2M4kgxMEeM3oUYtKI54N1CVnwKrk9A
root:
user.present:
- password: {{ salt['pillar.get']('secrets:root') }}
- shell: /bin/bash
- home: /root
- groups:
- sudo
ssh_auth.present:
- user: root
- enc: ed25519
- config: '/root/.ssh/authorized_keys'
- names:
- AAAAC3NzaC1lZDI1NTE5AAAAIBNPXegfN6YaATTyrq9ow5didiMvG+CjOEzmK6+vWomH
- AAAAC3NzaC1lZDI1NTE5AAAAIJjM78UyIQWNbMsca2qafeshPflijH8HbbsKuTTZqB1F
- AAAAC3NzaC1lZDI1NTE5AAAAIJpASWQUj+UkSv2M4kgxMEeM3oUYtKI54N1CVnwKrk9A
enable_sshd_passwords:
file.line:
- name: /etc/ssh/sshd_config
- match: "PasswordAuthentication no"
- content: "PasswordAuthentication yes"
- mode: replace
reload_sshd:
service.running:
- name: sshd
- reload: True