Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading molecule to version 3 #457

Merged
merged 3 commits into from
Apr 28, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion roles/splunk_cluster_master/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 0 additions & 16 deletions roles/splunk_heavy_forwarder/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
options:
c: ../../.yamllint
platforms:
- name: instance
image: splunk/splunk
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
options:
c: ../../.yamllint
platforms:
- name: instance
image: splunk/splunk
Expand All @@ -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
16 changes: 0 additions & 16 deletions roles/splunk_standalone/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
options:
c: ../../.yamllint
platforms:
- name: instance
image: splunk/splunk
Expand All @@ -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
16 changes: 0 additions & 16 deletions roles/splunk_standalone/molecule/systemd/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
16 changes: 0 additions & 16 deletions roles/splunk_universal_forwarder/molecule/deb/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
16 changes: 0 additions & 16 deletions roles/splunk_universal_forwarder/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 0 additions & 16 deletions roles/splunk_universal_forwarder/molecule/rpm/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
16 changes: 0 additions & 16 deletions roles/splunk_universal_forwarder/molecule/systemd/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
File renamed without changes.
6 changes: 4 additions & 2 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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