update
This commit is contained in:
parent
83d36260e9
commit
d2e4b239bd
13 changed files with 57 additions and 69 deletions
20
ansible/roles/security/tasks/defaults.yml
Normal file
20
ansible/roles/security/tasks/defaults.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
- name: Configure Security Auto Updates
|
||||
shell:
|
||||
cmd: dpkg-reconfigure -p medium unattended-upgrades
|
||||
become: yes
|
||||
when: ansible_facts["os_family"] == 'Debian'
|
||||
|
||||
- name: Check if UFW is installed
|
||||
command: ufw version
|
||||
register: ufw_version
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Configure UFW
|
||||
shell:
|
||||
cmd: |
|
||||
ufw enable
|
||||
ufw default deny incoming
|
||||
ufw default allow outgoing
|
||||
become: yes
|
||||
when: ufw_version.rc == 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue