Add role for ensuring a cit user, which has root privileges
This commit is contained in:
18
playbooks/roles/cit_user/tasks/main.yaml
Normal file
18
playbooks/roles/cit_user/tasks/main.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
- name: Ensure cit user
|
||||
ansible.builtin.user:
|
||||
name: cit
|
||||
create_home: true
|
||||
shell: /bin/bash
|
||||
password: '!'
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Ensure cit user has root privileges
|
||||
community.general.sudoers:
|
||||
name: cit root privileges
|
||||
user: cit
|
||||
commands: ALL
|
||||
host: ALL
|
||||
nopassword: true
|
||||
validation: required
|
||||
state: present
|
||||
Reference in New Issue
Block a user