add restic env, firewall

This commit is contained in:
root
2020-05-15 19:49:32 -04:00
parent d41cfa1ac0
commit e500c425ec
10 changed files with 84 additions and 7 deletions

20
firewall/init.sls Normal file
View File

@@ -0,0 +1,20 @@
{% from "firewall/map.jinja" import firewall %}
iptables:
pkg.installed:
- pkgs:
- {{ firewall['pkg'] }}
file.managed:
- name: {{ firewall['cfg'] }}
- source: 'salt://firewall/files/iptables.jinja'
- template: jinja
service.running:
- name: {{ firewall['svc'] }}
- enable: True
- watch:
- file: iptables
{% if firewall['remove'] is not none %}
{{ firewall['remove'] }}:
pkg.removed: []
{% endif %}