diff --git a/Makefile b/Makefile index f6aaaef1..9848c91a 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ py3k-test-setup: pip3 install -r $(shell pwd)/tests/requirements.txt --upgrade lint: test-setup - ansible-lint -v -c ./tests/lint.cfg site.yml roles/**/**/*.yml roles/**/**/**/*.yml + ansible-lint -v -c ./tests/ansible-lint.cfg site.yml roles/**/**/*.yml roles/**/**/**/*.yml py3k-lint: test-setup # We're treating each file separately here, because of their scarsity diff --git a/roles/splunk_cluster_master/tasks/main.yml b/roles/splunk_cluster_master/tasks/main.yml index 6fec79f9..46363e8b 100644 --- a/roles/splunk_cluster_master/tasks/main.yml +++ b/roles/splunk_cluster_master/tasks/main.yml @@ -16,7 +16,7 @@ - include_tasks: apply_cluster_bundle.yml -# This installed_apps list gets mutated by ESS bundle generation, hence we +# This installed_apps list gets mutated by ESS bundle generation, hence we # need to refresh this array of apps before disabling them all - include_tasks: ../../../roles/splunk_common/tasks/find_installed_apps.yml when: splunk.apps_location diff --git a/roles/splunk_heavy_forwarder/molecule/default/playbook.yml b/roles/splunk_heavy_forwarder/molecule/default/converge.yml similarity index 100% rename from roles/splunk_heavy_forwarder/molecule/default/playbook.yml rename to roles/splunk_heavy_forwarder/molecule/default/converge.yml diff --git a/roles/splunk_heavy_forwarder/molecule/default/molecule.yml b/roles/splunk_heavy_forwarder/molecule/default/molecule.yml index 42f411ab..861f8c63 100644 --- a/roles/splunk_heavy_forwarder/molecule/default/molecule.yml +++ b/roles/splunk_heavy_forwarder/molecule/default/molecule.yml @@ -3,10 +3,6 @@ dependency: name: galaxy driver: name: docker -lint: - name: yamllint - options: - c: ../../.yamllint platforms: - name: instance image: splunk/splunk @@ -17,20 +13,8 @@ platforms: no_proxy: "${no_proxy}" provisioner: name: ansible - lint: - name: ansible-lint - enabled: true - options: - x: ["204", "701"] - force-color: true log: true -scenario: - name: default verifier: name: testinfra - lint: - name: flake8 - options: - ignore: E501 options: junit-xml: ../../../../tests/results/heavy-default-results.xml diff --git a/roles/splunk_heavy_forwarder/molecule/manual-forwards/playbook.yml b/roles/splunk_heavy_forwarder/molecule/manual-forwards/converge.yml similarity index 100% rename from roles/splunk_heavy_forwarder/molecule/manual-forwards/playbook.yml rename to roles/splunk_heavy_forwarder/molecule/manual-forwards/converge.yml diff --git a/roles/splunk_heavy_forwarder/molecule/manual-forwards/molecule.yml b/roles/splunk_heavy_forwarder/molecule/manual-forwards/molecule.yml index 38c794e5..42d40ea7 100644 --- a/roles/splunk_heavy_forwarder/molecule/manual-forwards/molecule.yml +++ b/roles/splunk_heavy_forwarder/molecule/manual-forwards/molecule.yml @@ -3,10 +3,6 @@ dependency: name: galaxy driver: name: docker -lint: - name: yamllint - options: - c: ../../.yamllint platforms: - name: instance image: splunk/splunk @@ -17,20 +13,8 @@ platforms: no_proxy: "${no_proxy}" provisioner: name: ansible - lint: - name: ansible-lint - enabled: true - options: - x: ["204", "701"] - force-color: true log: true -scenario: - name: manual-forwards verifier: name: testinfra - lint: - name: flake8 - options: - ignore: E501 options: junit-xml: ../../../../tests/results/heavy-manual-forwards-results.xml diff --git a/roles/splunk_standalone/molecule/default/playbook.yml b/roles/splunk_standalone/molecule/default/converge.yml similarity index 100% rename from roles/splunk_standalone/molecule/default/playbook.yml rename to roles/splunk_standalone/molecule/default/converge.yml diff --git a/roles/splunk_standalone/molecule/default/molecule.yml b/roles/splunk_standalone/molecule/default/molecule.yml index b1f355af..21fa82be 100644 --- a/roles/splunk_standalone/molecule/default/molecule.yml +++ b/roles/splunk_standalone/molecule/default/molecule.yml @@ -3,10 +3,6 @@ dependency: name: galaxy driver: name: docker -lint: - name: yamllint - options: - c: ../../.yamllint platforms: - name: instance image: splunk/splunk @@ -17,20 +13,8 @@ platforms: no_proxy: "${no_proxy}" provisioner: name: ansible - lint: - name: ansible-lint - enabled: true - options: - x: ["204", "701"] - force-color: true log: true -scenario: - name: default verifier: name: testinfra - lint: - name: flake8 - options: - ignore: E501 options: junit-xml: ../../../../tests/results/standalone-default-results.xml diff --git a/roles/splunk_standalone/molecule/systemd/playbook.yml b/roles/splunk_standalone/molecule/systemd/converge.yml similarity index 100% rename from roles/splunk_standalone/molecule/systemd/playbook.yml rename to roles/splunk_standalone/molecule/systemd/converge.yml diff --git a/roles/splunk_standalone/molecule/systemd/molecule.yml b/roles/splunk_standalone/molecule/systemd/molecule.yml index 432f9458..206fae33 100644 --- a/roles/splunk_standalone/molecule/systemd/molecule.yml +++ b/roles/splunk_standalone/molecule/systemd/molecule.yml @@ -3,10 +3,6 @@ dependency: name: galaxy driver: name: docker -lint: - name: yamllint - options: - c: ../../.yamllint platforms: - name: splunk_standalone-systemd-centos8 image: geerlingguy/docker-centos8-ansible:latest @@ -26,19 +22,7 @@ platforms: provisioner: name: ansible log: true - lint: - name: ansible-lint - enabled: true - options: - x: ["204", "701"] - force-color: true -scenario: - name: systemd verifier: name: testinfra - lint: - name: flake8 - options: - ignore: E501 options: junit-xml: ../../../../tests/results/uf-rpm-test-results.xml diff --git a/roles/splunk_universal_forwarder/molecule/deb/playbook.yml b/roles/splunk_universal_forwarder/molecule/deb/converge.yml similarity index 100% rename from roles/splunk_universal_forwarder/molecule/deb/playbook.yml rename to roles/splunk_universal_forwarder/molecule/deb/converge.yml diff --git a/roles/splunk_universal_forwarder/molecule/deb/molecule.yml b/roles/splunk_universal_forwarder/molecule/deb/molecule.yml index e2a33179..63fb7a34 100644 --- a/roles/splunk_universal_forwarder/molecule/deb/molecule.yml +++ b/roles/splunk_universal_forwarder/molecule/deb/molecule.yml @@ -3,10 +3,6 @@ dependency: name: galaxy driver: name: docker -lint: - name: yamllint - options: - c: ../../.yamllint platforms: - name: debian10 image: geerlingguy/docker-debian10-ansible:latest @@ -25,19 +21,7 @@ platforms: provisioner: name: ansible log: true - lint: - name: ansible-lint - enabled: true - options: - x: ["204", "701"] - force-color: true -scenario: - name: deb verifier: name: testinfra - lint: - name: flake8 - options: - ignore: E501 options: junit-xml: ../../../../tests/results/uf-deb-test-results.xml diff --git a/roles/splunk_universal_forwarder/molecule/default/playbook.yml b/roles/splunk_universal_forwarder/molecule/default/converge.yml similarity index 100% rename from roles/splunk_universal_forwarder/molecule/default/playbook.yml rename to roles/splunk_universal_forwarder/molecule/default/converge.yml diff --git a/roles/splunk_universal_forwarder/molecule/default/molecule.yml b/roles/splunk_universal_forwarder/molecule/default/molecule.yml index b401f0f6..f6f72b6b 100644 --- a/roles/splunk_universal_forwarder/molecule/default/molecule.yml +++ b/roles/splunk_universal_forwarder/molecule/default/molecule.yml @@ -3,29 +3,13 @@ dependency: name: galaxy driver: name: docker -lint: - name: yamllint - options: - c: ../../.yamllint platforms: - name: instance image: splunk/universalforwarder command: no-provision provisioner: name: ansible - lint: - name: ansible-lint - enabled: true - options: - x: ["204", "701"] - force-color: true -scenario: - name: default verifier: name: testinfra - lint: - name: flake8 - options: - ignore: E501 options: junit-xml: ../../../../tests/results/uf-default-results.xml diff --git a/roles/splunk_universal_forwarder/molecule/forward_servers/playbook.yml b/roles/splunk_universal_forwarder/molecule/forward_servers/converge.yml similarity index 100% rename from roles/splunk_universal_forwarder/molecule/forward_servers/playbook.yml rename to roles/splunk_universal_forwarder/molecule/forward_servers/converge.yml diff --git a/roles/splunk_universal_forwarder/molecule/forward_servers/molecule.yml b/roles/splunk_universal_forwarder/molecule/forward_servers/molecule.yml index ee30e1bd..3e291454 100644 --- a/roles/splunk_universal_forwarder/molecule/forward_servers/molecule.yml +++ b/roles/splunk_universal_forwarder/molecule/forward_servers/molecule.yml @@ -3,29 +3,13 @@ dependency: name: galaxy driver: name: docker -lint: - name: yamllint - options: - c: ../../.yamllint platforms: - name: instance-forward_servers image: splunk/universalforwarder command: no-provision provisioner: name: ansible - lint: - name: ansible-lint - enabled: true - options: - x: ["204", "701"] - force-color: true -scenario: - name: forward_servers verifier: name: testinfra - lint: - name: flake8 - options: - ignore: E501 options: junit-xml: ../../../../tests/results/uf-forward_servers-results.xml diff --git a/roles/splunk_universal_forwarder/molecule/rpm/playbook.yml b/roles/splunk_universal_forwarder/molecule/rpm/converge.yml similarity index 100% rename from roles/splunk_universal_forwarder/molecule/rpm/playbook.yml rename to roles/splunk_universal_forwarder/molecule/rpm/converge.yml diff --git a/roles/splunk_universal_forwarder/molecule/rpm/molecule.yml b/roles/splunk_universal_forwarder/molecule/rpm/molecule.yml index b6c29023..06e003ba 100644 --- a/roles/splunk_universal_forwarder/molecule/rpm/molecule.yml +++ b/roles/splunk_universal_forwarder/molecule/rpm/molecule.yml @@ -3,10 +3,6 @@ dependency: name: galaxy driver: name: docker -lint: - name: yamllint - options: - c: ../../.yamllint platforms: - name: centos7 image: geerlingguy/docker-centos7-ansible:latest @@ -25,19 +21,7 @@ platforms: provisioner: name: ansible log: true - lint: - name: ansible-lint - enabled: true - options: - x: ["204", "701"] - force-color: true -scenario: - name: rpm verifier: name: testinfra - lint: - name: flake8 - options: - ignore: E501 options: junit-xml: ../../../../tests/results/uf-rpm-test-results.xml diff --git a/roles/splunk_universal_forwarder/molecule/systemd/playbook.yml b/roles/splunk_universal_forwarder/molecule/systemd/converge.yml similarity index 100% rename from roles/splunk_universal_forwarder/molecule/systemd/playbook.yml rename to roles/splunk_universal_forwarder/molecule/systemd/converge.yml diff --git a/roles/splunk_universal_forwarder/molecule/systemd/molecule.yml b/roles/splunk_universal_forwarder/molecule/systemd/molecule.yml index f45fb539..4f8b89d4 100644 --- a/roles/splunk_universal_forwarder/molecule/systemd/molecule.yml +++ b/roles/splunk_universal_forwarder/molecule/systemd/molecule.yml @@ -3,10 +3,6 @@ dependency: name: galaxy driver: name: docker -lint: - name: yamllint - options: - c: ../../.yamllint platforms: - name: splunk_universal_forwarder-systemd-centos8 image: geerlingguy/docker-centos8-ansible:latest @@ -24,19 +20,7 @@ platforms: provisioner: name: ansible log: true - lint: - name: ansible-lint - enabled: true - options: - x: ["204", "701"] - force-color: true -scenario: - name: systemd verifier: name: testinfra - lint: - name: flake8 - options: - ignore: E501 options: junit-xml: ../../../../tests/results/uf-rpm-test-results.xml diff --git a/tests/lint.cfg b/tests/ansible-lint.cfg similarity index 100% rename from tests/lint.cfg rename to tests/ansible-lint.cfg diff --git a/tests/requirements.txt b/tests/requirements.txt index 2b3c393a..d0be4003 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,8 +3,10 @@ pylint mock docker requests -molecule==2.22 +molecule==3.0.2 coverage caniusepython3 -ansible>=2.8.2 +ansible==2.9.7 ansible-lint>=4.2.0 +testinfra +sh==1.12.14