x
This commit is contained in:
+25
-26
@@ -148,6 +148,31 @@
|
||||
key: "{{ lookup('file', 'files/ssh-keys/heath.pub') }}"
|
||||
|
||||
|
||||
#### User: first
|
||||
|
||||
- name: Create the first user
|
||||
become: true
|
||||
ansible.builtin.user:
|
||||
name: first
|
||||
comment: First User
|
||||
state: present
|
||||
system: false
|
||||
groups: hpf-sudo-np
|
||||
append: true
|
||||
create_home: true
|
||||
shell: /usr/bin/bash
|
||||
|
||||
- name: Set first's authorized_keys
|
||||
become: true
|
||||
ansible.posix.authorized_key:
|
||||
user: first
|
||||
state: present
|
||||
key: "{{ lookup('file', item) }}"
|
||||
loop:
|
||||
- files/ssh-keys/first.pub
|
||||
- files/ssh-keys/heath.pub
|
||||
|
||||
|
||||
#### User: hpf-ans
|
||||
|
||||
- name: Create the hpf-ans group
|
||||
@@ -219,32 +244,6 @@
|
||||
backup: true
|
||||
|
||||
|
||||
#### User: first
|
||||
|
||||
- name: Create the first user
|
||||
become: true
|
||||
ansible.builtin.user:
|
||||
name: first
|
||||
comment: First User
|
||||
state: present
|
||||
system: false
|
||||
groups: hpf-sudo-np
|
||||
append: true
|
||||
create_home: true
|
||||
shell: /usr/bin/bash
|
||||
uid_max: 1000
|
||||
|
||||
- name: Set first's authorized_keys
|
||||
become: true
|
||||
ansible.posix.authorized_key:
|
||||
user: first
|
||||
state: present
|
||||
key: "{{ lookup('file', item) }}"
|
||||
loop:
|
||||
- files/ssh-keys/first.pub
|
||||
- files/ssh-keys/heath.pub
|
||||
|
||||
|
||||
#### User: heath
|
||||
|
||||
- name: Create the heath group
|
||||
|
||||
Reference in New Issue
Block a user