mirror of
https://github.com/jbowdre/vagrant-saltlab.git
synced 2024-11-30 08:32:17 +00:00
configure/unconfigure firewall
This commit is contained in:
parent
62bd4a6f35
commit
6a83a4a393
2 changed files with 21 additions and 3 deletions
|
@ -13,13 +13,22 @@ install_html_file:
|
||||||
- require:
|
- require:
|
||||||
- pkg: {{ pillar['pkgs']['apache'] }}
|
- pkg: {{ pillar['pkgs']['apache'] }}
|
||||||
|
|
||||||
configure_firewall:
|
configure_firewall_service:
|
||||||
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:
|
||||||
- http
|
- webserver
|
||||||
- https
|
|
||||||
|
|
|
@ -5,3 +5,12 @@ uninstall_apache:
|
||||||
remove_html_file:
|
remove_html_file:
|
||||||
file.absent:
|
file.absent:
|
||||||
- name: /var/www/html/index.html
|
- name: /var/www/html/index.html
|
||||||
|
|
||||||
|
unconfigure_firewall:
|
||||||
|
module.run:
|
||||||
|
- firewalld.remove_service:
|
||||||
|
- service: webserver
|
||||||
|
- zone: public
|
||||||
|
- firewalld.delete_service:
|
||||||
|
- name: webserver
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue