This commit is contained in:
DeveloperDurp 2025-12-27 15:29:27 -06:00
parent 83d36260e9
commit d2e4b239bd
13 changed files with 57 additions and 69 deletions

View 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

View file

@ -0,0 +1,11 @@
- name: Load a variable file
include_vars: "{{ item }}"
with_first_found:
- "vars/{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml"
- "vars/{{ ansible_distribution }}.yml"
- "vars/{{ ansible_os_family }}.yml"
- "vars/defaults.yml"
- name: "load tasks"
include_tasks: "defaults.yml"