use symlink to fix testinfra iptables module
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
545746b16a
commit
6c5c42fca6
@ -1,5 +1,15 @@
|
|||||||
---
|
---
|
||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
|
|
||||||
|
pre_tasks:
|
||||||
|
- name: Add symlink for iptables
|
||||||
|
file:
|
||||||
|
src: /usr/sbin/iptables
|
||||||
|
dest: /usr/bin/iptables
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
state: link
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: xoxys.iptables
|
- role: xoxys.iptables
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
|
|
||||||
import testinfra.utils.ansible_runner
|
import testinfra.utils.ansible_runner
|
||||||
|
|
||||||
@ -9,8 +8,6 @@ warnings.filterwarnings("ignore", category=DeprecationWarning)
|
|||||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||||
|
|
||||||
sys.path.append('/usr/sbin')
|
|
||||||
|
|
||||||
|
|
||||||
def test_iptables_is_installed(host):
|
def test_iptables_is_installed(host):
|
||||||
iptables = host.package("iptables")
|
iptables = host.package("iptables")
|
||||||
|
Loading…
Reference in New Issue
Block a user