mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
fix return null iptables.append
return null in iptables.append,fix it ``` salt 'node1' iptables.append filter INPUT rule='-s 0.0.0.0 -p tcp --dport 80 -j ACCEPT' node1: True salt 'node1' iptables.append filter INPUT rule='-s 0.0.0.0 -p tcp --dport 80 -j ACCEPT4' node1: False ```
This commit is contained in:
parent
7a74358cca
commit
72be91647c
@ -407,7 +407,10 @@ def append(table='filter', chain=None, rule=None):
|
||||
|
||||
cmd = 'iptables -t {0} -A {1} {2}'.format(table, chain, rule)
|
||||
out = __salt__['cmd.run'](cmd)
|
||||
return out
|
||||
if len(out) == 0 :
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def insert(table='filter', chain=None, position=None, rule=None):
|
||||
|
Loading…
Reference in New Issue
Block a user