diff options
author | 2021-06-08 15:27:01 +0200 | |
---|---|---|
committer | 2021-06-29 10:44:39 +0200 | |
commit | 10f99ad8c6c580a30e54d16dd4d9a3821bcc4761 (patch) | |
tree | ed748c8c8134251a2edac5cee25730b47a51617a | |
parent | fc1e1721c335275284bd9f231af7eed603663d45 (diff) |
[MOLECULE] Add setup for new 'k8s-persistent-volume' role
Change-Id: If7eb6c058746a98566f41d8354159624293ba58d
Issue-ID: INT-1926
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
4 files changed, 49 insertions, 0 deletions
diff --git a/ansible/roles/k8s-persistent-volume/.yamllint b/ansible/roles/k8s-persistent-volume/.yamllint new file mode 100644 index 00000000..c5ae64be --- /dev/null +++ b/ansible/roles/k8s-persistent-volume/.yamllint @@ -0,0 +1,12 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable diff --git a/ansible/roles/k8s-persistent-volume/molecule/default/converge.yml b/ansible/roles/k8s-persistent-volume/molecule/default/converge.yml new file mode 100644 index 00000000..4e15b3c8 --- /dev/null +++ b/ansible/roles/k8s-persistent-volume/molecule/default/converge.yml @@ -0,0 +1,12 @@ +--- +- name: Converge + hosts: all + pre_tasks: + - name: Include kubernetes group variables + include_vars: ../../../../group_vars/kubernetes.yml + - name: Include test scenario variables + include_vars: vars.yml + tasks: + - name: "Include k8s-persistent-volume" + include_role: + name: "k8s-persistent-volume" diff --git a/ansible/roles/k8s-persistent-volume/molecule/default/molecule.yml b/ansible/roles/k8s-persistent-volume/molecule/default/molecule.yml new file mode 100644 index 00000000..dbbf0d81 --- /dev/null +++ b/ansible/roles/k8s-persistent-volume/molecule/default/molecule.yml @@ -0,0 +1,23 @@ +--- +dependency: + name: galaxy +driver: + name: docker +lint: | + set -e + yamllint . + ansible-lint . + flake8 +platforms: + - name: infrastructure-k8s-persistent-volume + image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6} + pre_build_image: true + groups: + - infrastructure +provisioner: + name: ansible + env: + ANSIBLE_ROLES_PATH: ../../../../test/roles + ANSIBLE_LIBRARY: ../../../../library +verifier: + name: testinfra diff --git a/ansible/roles/k8s-persistent-volume/molecule/default/vars.yml b/ansible/roles/k8s-persistent-volume/molecule/default/vars.yml new file mode 100644 index 00000000..ce473376 --- /dev/null +++ b/ansible/roles/k8s-persistent-volume/molecule/default/vars.yml @@ -0,0 +1,2 @@ +--- +k8s_volumes: [] |