Browse Source

Cleaning

tags/v0.2.0
Alexandre Anriot 6 years ago
parent
commit
14fe79bf14
2 changed files with 0 additions and 3 deletions
  1. +0
    -2
      _modules/ufw.py
  2. +0
    -1
      ufw/init.sls

+ 0
- 2
_modules/ufw.py View File

cmd = 'ufw --force enable' if enabled else 'ufw disable' cmd = 'ufw --force enable' if enabled else 'ufw disable'
__salt__['cmd.run'](cmd) __salt__['cmd.run'](cmd)



def add_rule(rule): def add_rule(rule):
cmd = "ufw " + rule cmd = "ufw " + rule
out = __salt__['cmd.run'](cmd, python_shell=True) out = __salt__['cmd.run'](cmd, python_shell=True)
# __salt__['cmd.run']("ufw reload") # why reload after adding a rule? :/
return out return out

+ 0
- 1
ufw/init.sls View File

- name: ufw logging off - name: ufw logging off
- unless: "grep 'LOGLEVEL=off' /etc/ufw/ufw.conf" - unless: "grep 'LOGLEVEL=off' /etc/ufw/ufw.conf"



{% else %} {% else %}
#ufw: #ufw:
#ufw: #ufw:

Loading…
Cancel
Save