Make systems production ready.
This commit is contained in:
parent
b518b9a206
commit
9d11c95794
2 changed files with 29 additions and 0 deletions
20
roles/lmn_security/tasks/main.yml
Normal file
20
roles/lmn_security/tasks/main.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
- name: Deploy SSH keys
|
||||
ansible.posix.authorized_key:
|
||||
user: ansible
|
||||
key: "{{ item }}"
|
||||
loop: "{{ keys2deploy }}"
|
||||
|
||||
- name: Allow sudo access without password
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/sudoers.d/95-lmn-ansible
|
||||
line: 'ansible ALL=(root) NOPASSWD: ALL'
|
||||
create: True
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0700'
|
||||
|
||||
- name: Disable ansible user login
|
||||
ansible.builtin.user:
|
||||
name: ansible
|
||||
password_lock: True
|
Loading…
Add table
Add a link
Reference in a new issue