kayobe/ansible/roles/firewalld/tasks/disabled.yml
k-s-dean 6990a041c7 Add support for firewalld on Ubuntu
Enables the installation and configuration of firewalld on Ubuntu
systems.

Change-Id: I4a97a2aeed277be672e15e5c7727b810e11d3c42
Story: 2010160
Task: 45818
2022-07-27 10:54:43 +01:00

19 lines
483 B
YAML

---
- name: Ensure firewalld service is stopped and disabled
service:
name: firewalld
enabled: false
state: stopped
become: true
register: firewalld_result
failed_when:
- firewalld_result is failed
# Ugh, Ansible's service module doesn't handle uninstalled services.
- "'Could not find the requested service' not in firewalld_result.msg"
- name: Ensure firewalld package is uninstalled
package:
name: firewalld
state: absent
become: true