Commit cdb902d1 authored by Pietro Albini's avatar Pietro Albini

common/firewall: deploy

parent b98790c4
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- name: create the firewall config dir - name: create the firewall config dir
file: file:
path: /usr/local/share/firewall.d path: /etc/firewall
mode: 0700 mode: 0700
state: directory state: directory
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
- name: ssh - name: ssh
include: ssh.yml include: ssh.yml
#- name: firewall - name: firewall
# include: firewall.yml include: firewall.yml
#- name: backup #- name: backup
# include: backup.yml # include: backup.yml
......
...@@ -106,7 +106,7 @@ command -A input -j DROP ...@@ -106,7 +106,7 @@ command -A input -j DROP
echo "Applied basic configuration to the firewall" echo "Applied basic configuration to the firewall"
# Load other config files # Load other config files
for file in /usr/local/share/firewall.d/*.sh; do for file in /etc/firewall/*.sh; do
if [[ -x "${file}" ]]; then if [[ -x "${file}" ]]; then
echo "Loading script ${file}" echo "Loading script ${file}"
source "${file}" source "${file}"
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
- name: "Expose {{ name }} ports" - name: "Expose {{ name }} ports"
template: template:
src: firewall.sh.j2 src: firewall.sh.j2
dest: "/usr/local/share/firewall.d/lxd-container-{{ name }}.sh" dest: "/etc/firewall/lxd-container-{{ name }}.sh"
mode: 0700 mode: 0700
when: expose_ports when: expose_ports
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
- name: Allow http through the firewall - name: Allow http through the firewall
template: template:
src: firewall.sh src: firewall.sh
dest: /usr/local/share/firewall.d/nginx.sh dest: /etc/firewall/nginx.sh
mode: 0700 mode: 0700
notify: notify:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment