homeserver/roles/oefenweb.ufw/tasks/main.yml
mg d17caba23d Fix deprecation warning (#495)
https://github.com/Oefenweb/ansible-ufw/pull/44
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: #495
2023-04-06 20:15:29 +02:00

43 lines
849 B
YAML

# tasks file
---
- name: facts | set
set_fact:
kernel_version: "{{ ansible_kernel | regex_search('^([0-9]+\\.[0-9]+\\.[0-9]+)') }}"
tags:
- configuration
- ufw
- ufw-facts
# see https://askubuntu.com/a/1064533/261010, https://www.spinics.net/lists/netfilter-devel/msg55682.html
- include_tasks:
file: fix-dropped-ssh-sessions.yml
when:
- kernel_version is version('4.14', '>=')
- kernel_version is version('5', '<')
tags:
- configuration
- ufw
- ufw-fix-dropped-ssh-sessions
- include_tasks:
file: install.yml
tags:
- configuration
- ufw
- ufw-install
- include_tasks:
file: configure.yml
tags:
- configuration
- ufw
- ufw-configure
- name: start and enable service
ufw:
state: enabled
tags:
- configuration
- ufw
- ufw-start-enable-service