Skip to content

Commit

Permalink
[MOLECULE 3.3.0] Upgrade linters Molecule setup
Browse files Browse the repository at this point in the history
In 3.x.x version family of Molecule the syntax for linters
invocation has been changed.

Ref.: https://molecule.readthedocs.io/en/latest/configuration.html#lint

Change-Id: I82d1fd996eb5853953ea6bc74dcbb88a485a2084
Issue-ID: OOM-2722
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
  • Loading branch information
bartekgb committed Apr 8, 2021
1 parent cecf6cf commit 018a6ab
Show file tree
Hide file tree
Showing 68 changed files with 252 additions and 276 deletions.
1 change: 1 addition & 0 deletions ansible/roles/application/.yamllint
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
extends: default

rules:
Expand Down
11 changes: 5 additions & 6 deletions ansible/roles/application/molecule/custom_role/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
set -e
yamllint .
ansible-lint .
flake8
platforms:
- name: instance
image: centos:7
Expand All @@ -30,8 +33,6 @@ provisioner:
application_pre_install_role: application/test-patch-role
application_post_install_role: application/test-patch-role
helm_version: v2
lint:
name: ansible-lint
playbooks:
prepare: ../default/prepare.yml
converge: ../default/playbook.yml
Expand All @@ -52,5 +53,3 @@ scenario:
- destroy
verifier:
name: testinfra
lint:
name: flake8
11 changes: 5 additions & 6 deletions ansible/roles/application/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
set -e
yamllint .
ansible-lint .
flake8
platforms:
- name: instance
image: centos:7
Expand All @@ -28,8 +31,6 @@ provisioner:
- onap
app_helm_chart_name: "{{ app_name }}"
helm_version: v2
lint:
name: ansible-lint
scenario:
name: default
test_sequence:
Expand All @@ -55,5 +56,3 @@ scenario:
- destroy
verifier:
name: testinfra
lint:
name: flake8
11 changes: 5 additions & 6 deletions ansible/roles/application/molecule/helm3/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
set -e
yamllint .
ansible-lint .
flake8
platforms:
- name: instance-helm3
image: centos:7
Expand All @@ -28,8 +31,6 @@ provisioner:
- onap
app_helm_chart_name: "{{ app_name }}"
helm_version: v3
lint:
name: ansible-lint
playbooks:
prepare: ../default/prepare.yml
converge: ../default/playbook.yml
Expand All @@ -50,5 +51,3 @@ scenario:
- destroy
verifier:
name: testinfra
lint:
name: flake8
11 changes: 5 additions & 6 deletions ansible/roles/application/molecule/ubuntu/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
set -e
yamllint .
ansible-lint .
flake8
platforms:
- name: instance
image: ubuntu:18.04
Expand All @@ -29,8 +32,6 @@ provisioner:
- onap
app_helm_chart_name: "{{ app_name }}"
helm_version: v2
lint:
name: ansible-lint
playbooks:
prepare: ../default/prepare.yml
converge: ../default/playbook.yml
Expand Down Expand Up @@ -60,6 +61,4 @@ scenario:
- destroy
verifier:
name: testinfra
lint:
name: flake8
directory: ../default/tests/
1 change: 1 addition & 0 deletions ansible/roles/certificates/.yamllint
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
extends: default

rules:
Expand Down
11 changes: 5 additions & 6 deletions ansible/roles/certificates/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
set -e
yamllint .
ansible-lint .
flake8
platforms:
- name: infrastructure-server
image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
Expand All @@ -24,8 +27,6 @@ platforms:
provisioner:
name: ansible
log: true
lint:
name: ansible-lint
env:
ANSIBLE_ROLES_PATH: ../../../../test/roles
ANSIBLE_LIBRARY: ../../../../library
Expand Down Expand Up @@ -63,5 +64,3 @@ verifier:
name: testinfra
options:
verbose: true
lint:
name: flake8
11 changes: 5 additions & 6 deletions ansible/roles/certificates/molecule/ubuntu/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
set -e
yamllint .
ansible-lint .
flake8
platforms:
- name: infrastructure-server
image: molecule-${PREBUILD_PLATFORM_DISTRO:-ubuntu}:${PREBUILD_DISTRO_VERSION:-18.04}
Expand All @@ -23,8 +26,6 @@ platforms:
provisioner:
name: ansible
log: true
lint:
name: ansible-lint
env:
ANSIBLE_ROLES_PATH: ../../../../test/roles
ANSIBLE_LIBRARY: ../../../../library
Expand Down Expand Up @@ -64,6 +65,4 @@ verifier:
name: testinfra
options:
verbose: true
lint:
name: flake8
directory: ../default/tests
1 change: 1 addition & 0 deletions ansible/roles/chartmuseum/.yamllint
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
extends: default

rules:
Expand Down
11 changes: 5 additions & 6 deletions ansible/roles/chartmuseum/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
set -e
yamllint .
ansible-lint .
flake8
platforms:
- name: instance-chartmuseum
image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
Expand All @@ -17,8 +20,6 @@ platforms:
- infrastructure
provisioner:
name: ansible
lint:
name: ansible-lint
env:
ANSIBLE_ROLES_PATH: ../../../../test/roles
ANSIBLE_LIBRARY: ../../../../library
Expand All @@ -29,5 +30,3 @@ scenario:
name: default
verifier:
name: testinfra
lint:
name: flake8
11 changes: 5 additions & 6 deletions ansible/roles/chartmuseum/molecule/ubuntu/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
set -e
yamllint .
ansible-lint .
flake8
platforms:
- name: instance-ubuntu-chartmuseum
image: molecule-${PREBUILD_PLATFORM_DISTRO:-ubuntu}:${PREBUILD_DISTRO_VERSION:-18.04}
Expand All @@ -17,8 +20,6 @@ platforms:
- infrastructure
provisioner:
name: ansible
lint:
name: ansible-lint
env:
ANSIBLE_ROLES_PATH: ../../../../test/roles
ANSIBLE_LIBRARY: ../../../../library
Expand All @@ -32,6 +33,4 @@ scenario:
name: ubuntu
verifier:
name: testinfra
lint:
name: flake8
directory: ../default/tests/
1 change: 1 addition & 0 deletions ansible/roles/chrony/.yamllint
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
extends: default

rules:
Expand Down
11 changes: 5 additions & 6 deletions ansible/roles/chrony/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
set -e
yamllint .
ansible-lint .
flake8
platforms:
- name: infra_host
image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
Expand All @@ -26,13 +29,9 @@ platforms:
- kubernetes
provisioner:
name: ansible
lint:
name: ansible-lint
env:
ANSIBLE_ROLES_PATH: ../../../../test/roles
verifier:
name: testinfra
lint:
name: flake8
options:
v: 1
11 changes: 5 additions & 6 deletions ansible/roles/chrony/molecule/external_time_source/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
set -e
yamllint .
ansible-lint .
flake8
platforms:
- name: infra_host
image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
Expand All @@ -26,8 +29,6 @@ platforms:
- kubernetes
provisioner:
name: ansible
lint:
name: ansible-lint
env:
ANSIBLE_ROLES_PATH: ../../../../test/roles
inventory:
Expand All @@ -42,8 +43,6 @@ provisioner:
prepare: ../default/prepare.yml
verifier:
name: testinfra
lint:
name: flake8
options:
v: 1
directory: ../default/tests/
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
set -e
yamllint .
ansible-lint .
flake8
platforms:
- name: infra_host-ubuntu
image: molecule-${PREBUILD_PLATFORM_DISTRO:-ubuntu}:${PREBUILD_DISTRO_VERSION:-18.04}
Expand All @@ -26,8 +29,6 @@ platforms:
- kubernetes
provisioner:
name: ansible
lint:
name: ansible-lint
env:
ANSIBLE_ROLES_PATH: ../../../../test/roles
inventory:
Expand All @@ -43,8 +44,6 @@ provisioner:
converge: ../external_time_source/playbook.yml
verifier:
name: testinfra
lint:
name: flake8
options:
v: 1
directory: ../default/tests/
11 changes: 5 additions & 6 deletions ansible/roles/chrony/molecule/ubuntu/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
set -e
yamllint .
ansible-lint .
flake8
platforms:
- name: infra_host-ubuntu
image: molecule-${PREBUILD_PLATFORM_DISTRO:-ubuntu}:${PREBUILD_DISTRO_VERSION:-18.04}
Expand All @@ -26,17 +29,13 @@ platforms:
- kubernetes
provisioner:
name: ansible
lint:
name: ansible-lint
env:
ANSIBLE_ROLES_PATH: ../../../../test/roles
playbooks:
prepare: ../default/prepare.yml
converge: ../default/playbook.yml
verifier:
name: testinfra
lint:
name: flake8
options:
v: 1
directory: ../default/tests/
1 change: 1 addition & 0 deletions ansible/roles/dns/.yamllint
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
extends: default

rules:
Expand Down
Loading

0 comments on commit 018a6ab

Please sign in to comment.