mirror of
https://github.com/jbowdre/vagrant-saltlab.git
synced 2024-11-26 23:22: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:
|
||||
- pkg: {{ pillar['pkgs']['apache'] }}
|
||||
|
||||
configure_firewall:
|
||||
configure_firewall_service:
|
||||
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:
|
||||
- http
|
||||
- https
|
||||
- webserver
|
||||
|
|
|
@ -5,3 +5,12 @@ uninstall_apache:
|
|||
remove_html_file:
|
||||
file.absent:
|
||||
- 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