change how firewall is configured/unconfigured

This commit is contained in:
John Bowdre 2023-03-28 10:03:39 -05:00
parent 6a83a4a393
commit 8dd18fab3d
2 changed files with 11 additions and 16 deletions

View file

@ -13,22 +13,13 @@ install_html_file:
- require:
- pkg: {{ pillar['pkgs']['apache'] }}
configure_firewall_service:
configure_firewall:
pkg.installed:
- name: firewalld
firewalld.service:
- require:
- pkg: firewalld
- name: webserver
- ports:
- 80/tcp
- 443/tcp
configure_firewall_zone:
firewalld.present:
- require:
- pkg: firewalld
- firewalld: webserver
- name: public
- services:
- webserver
- http
- https

View file

@ -6,11 +6,15 @@ remove_html_file:
file.absent:
- name: /var/www/html/index.html
unconfigure_firewall:
unconfigure_firewall_http:
module.run:
- firewalld.remove_service:
- service: webserver
- service: http
- zone: public
unconfigure_firewall_https:
module.run:
- firewalld.remove_service:
- service: https
- zone: public
- firewalld.delete_service:
- name: webserver