mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-24 21:03:27 +00:00
fix: skip running testinfra on excluded ansible versions
Signed-off-by: gardar <gardar@users.noreply.github.com>
This commit is contained in:
parent
b471a1f4a4
commit
3b679c9161
66 changed files with 197 additions and 256 deletions
|
@ -61,6 +61,8 @@ platforms:
|
|||
command: /lib/systemd/systemd
|
||||
verifier:
|
||||
name: testinfra
|
||||
additional_files_or_dirs:
|
||||
- "../../../../../.testinfra/testinfra_helpers.py"
|
||||
provisioner:
|
||||
playbooks:
|
||||
converge: "${MOLECULE_PROJECT_DIRECTORY}/../../.config/molecule/converge.yml"
|
||||
|
|
67
.testinfra/testinfra_helpers.py
Normal file
67
.testinfra/testinfra_helpers.py
Normal file
|
@ -0,0 +1,67 @@
|
|||
import os
|
||||
import testinfra
|
||||
|
||||
|
||||
def get_ansible_version():
|
||||
"""
|
||||
Get the current Ansible version from localhost using the 'debug' module.
|
||||
|
||||
Returns:
|
||||
str: The current Ansible version (major.minor).
|
||||
"""
|
||||
localhost = testinfra.get_host(
|
||||
"ansible://localhost?ansible_inventory=localhost,"
|
||||
)
|
||||
local_ansible_version = localhost.ansible("debug", "var=ansible_version")
|
||||
ansible_version = '.'.join(
|
||||
local_ansible_version['ansible_version']['full'].split('.')[:2]
|
||||
)
|
||||
return ansible_version
|
||||
|
||||
|
||||
def filter_compatible_hosts(inventory, ansible_version):
|
||||
"""
|
||||
Filter hosts based on Ansible version compatibility.
|
||||
|
||||
Args:
|
||||
inventory (str): The inventory file path.
|
||||
ansible_version (str): The current Ansible version (major.minor).
|
||||
|
||||
Returns:
|
||||
list: A list of compatible hosts that do not have the current Ansible
|
||||
version in their exclude_ansible_vers hostvars.
|
||||
"""
|
||||
ansible_runner = testinfra.utils.ansible_runner.AnsibleRunner(inventory)
|
||||
all_hosts = ansible_runner.get_hosts('all')
|
||||
compatible_hosts = []
|
||||
|
||||
for host in all_hosts:
|
||||
# Get host variables
|
||||
host_vars = ansible_runner.get_variables(host)
|
||||
|
||||
# Check if the host should be excluded
|
||||
if 'exclude_ansible_vers' in host_vars:
|
||||
excluded_versions = host_vars['exclude_ansible_vers']
|
||||
if ansible_version in excluded_versions:
|
||||
continue
|
||||
compatible_hosts.append(host)
|
||||
|
||||
return compatible_hosts
|
||||
|
||||
|
||||
def get_target_hosts():
|
||||
"""
|
||||
Get the filtered target hosts based on the current Ansible version.
|
||||
|
||||
Returns:
|
||||
list: A list of hosts that are compatible with
|
||||
the current Ansible version.
|
||||
"""
|
||||
# Get current Ansible version
|
||||
current_ansible_version = get_ansible_version()
|
||||
|
||||
# Get the inventory file from environment
|
||||
inventory_file = os.environ['MOLECULE_INVENTORY_FILE']
|
||||
|
||||
# Filter the hosts based on the exclusion criteria
|
||||
return filter_compatible_hosts(inventory_file, current_ansible_version)
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("dirs", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
import pytest
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("dirs", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_service(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_service(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_files(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_service(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_files(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_service(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_service(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import yaml
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("dirs", [
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import yaml
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_directories(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_service(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_files(host):
|
||||
|
|
|
@ -2,11 +2,9 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
import pytest
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
Loading…
Reference in a new issue