mirror of
https://github.com/jbowdre/vagrant-saltlab.git
synced 2024-11-26 23:22:17 +00:00
change how firewall is configured/unconfigured
This commit is contained in:
parent
6a83a4a393
commit
8dd18fab3d
2 changed files with 11 additions and 16 deletions
|
@ -13,22 +13,13 @@ install_html_file:
|
||||||
- require:
|
- require:
|
||||||
- pkg: {{ pillar['pkgs']['apache'] }}
|
- pkg: {{ pillar['pkgs']['apache'] }}
|
||||||
|
|
||||||
configure_firewall_service:
|
configure_firewall:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
- name: firewalld
|
- name: firewalld
|
||||||
firewalld.service:
|
|
||||||
- require:
|
|
||||||
- pkg: firewalld
|
|
||||||
- name: webserver
|
|
||||||
- ports:
|
|
||||||
- 80/tcp
|
|
||||||
- 443/tcp
|
|
||||||
|
|
||||||
configure_firewall_zone:
|
|
||||||
firewalld.present:
|
firewalld.present:
|
||||||
- require:
|
- require:
|
||||||
- pkg: firewalld
|
- pkg: firewalld
|
||||||
- firewalld: webserver
|
|
||||||
- name: public
|
- name: public
|
||||||
- services:
|
- services:
|
||||||
- webserver
|
- http
|
||||||
|
- https
|
||||||
|
|
|
@ -6,11 +6,15 @@ remove_html_file:
|
||||||
file.absent:
|
file.absent:
|
||||||
- name: /var/www/html/index.html
|
- name: /var/www/html/index.html
|
||||||
|
|
||||||
unconfigure_firewall:
|
unconfigure_firewall_http:
|
||||||
module.run:
|
module.run:
|
||||||
- firewalld.remove_service:
|
- firewalld.remove_service:
|
||||||
- service: webserver
|
- service: http
|
||||||
|
- zone: public
|
||||||
|
|
||||||
|
unconfigure_firewall_https:
|
||||||
|
module.run:
|
||||||
|
- firewalld.remove_service:
|
||||||
|
- service: https
|
||||||
- zone: public
|
- zone: public
|
||||||
- firewalld.delete_service:
|
|
||||||
- name: webserver
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue