Privileges are important
This commit is contained in:
parent
7b9d345ed8
commit
5894376128
@ -8,6 +8,7 @@
|
|||||||
fetch:
|
fetch:
|
||||||
src: /etc/ssh/sshd_config
|
src: /etc/ssh/sshd_config
|
||||||
dest: "{{ inventory_hostname }}"
|
dest: "{{ inventory_hostname }}"
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: Backup os-release
|
- name: Backup os-release
|
||||||
fetch:
|
fetch:
|
||||||
@ -33,6 +34,7 @@
|
|||||||
exclusive: yes
|
exclusive: yes
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
|
||||||
- name: Give all users exclusively the current controller user's SSH key
|
- name: Give all users exclusively the current controller user's SSH key
|
||||||
ansible.posix.authorized_key:
|
ansible.posix.authorized_key:
|
||||||
user: "{{item}}"
|
user: "{{item}}"
|
||||||
@ -42,6 +44,7 @@
|
|||||||
become: yes
|
become: yes
|
||||||
loop: "{{ users_list.users }}"
|
loop: "{{ users_list.users }}"
|
||||||
|
|
||||||
|
- block:
|
||||||
- name: Ensure UFW is installed
|
- name: Ensure UFW is installed
|
||||||
package:
|
package:
|
||||||
name: ufw
|
name: ufw
|
||||||
@ -81,4 +84,4 @@
|
|||||||
name: "{{ ansible_user }}"
|
name: "{{ ansible_user }}"
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
password: "{{ genPass.stdout | password_hash('sha512') }}"
|
password: "{{ genPass.stdout | password_hash('sha512') }}"
|
||||||
|
become: yes
|
||||||
|
Loading…
Reference in New Issue
Block a user