diff options
Diffstat (limited to 'ansible/roles/strimzi-kafka-operator')
6 files changed, 94 insertions, 0 deletions
diff --git a/ansible/roles/strimzi-kafka-operator/.yamllint b/ansible/roles/strimzi-kafka-operator/.yamllint new file mode 100644 index 00000000..c5ae64be --- /dev/null +++ b/ansible/roles/strimzi-kafka-operator/.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/strimzi-kafka-operator/molecule/default/converge.yml b/ansible/roles/strimzi-kafka-operator/molecule/default/converge.yml new file mode 100644 index 00000000..b70400cd --- /dev/null +++ b/ansible/roles/strimzi-kafka-operator/molecule/default/converge.yml @@ -0,0 +1,8 @@ +--- +- name: Converge + hosts: all + pre_tasks: + - name: Include infrastructure group variables + include_vars: ../../../../group_vars/infrastructure.yml + roles: + - strimzi-kafka-operator diff --git a/ansible/roles/strimzi-kafka-operator/molecule/default/molecule.yml b/ansible/roles/strimzi-kafka-operator/molecule/default/molecule.yml new file mode 100644 index 00000000..003267d1 --- /dev/null +++ b/ansible/roles/strimzi-kafka-operator/molecule/default/molecule.yml @@ -0,0 +1,27 @@ +--- +dependency: + name: galaxy +driver: + name: docker +lint: | + set -e + yamllint . + ansible-lint . + flake8 +platforms: + - name: infrastructure-strimzi-kafka-operator + image: centos:7 + groups: + - infrastructure +provisioner: + name: ansible + env: + ANSIBLE_ROLES_PATH: ../../../../test/roles + ANSIBLE_LIBRARY: ../../../../library + inventory: + group_vars: + all: + app_name: onap + app_data_path: "/opt/{{ app_name }}" +verifier: + name: testinfra diff --git a/ansible/roles/strimzi-kafka-operator/molecule/default/prepare.yml b/ansible/roles/strimzi-kafka-operator/molecule/default/prepare.yml new file mode 100644 index 00000000..34b37f50 --- /dev/null +++ b/ansible/roles/strimzi-kafka-operator/molecule/default/prepare.yml @@ -0,0 +1,10 @@ +--- +- name: Prepare infra container to play strimzi-kafka-operator role + hosts: all + pre_tasks: + - name: Include infrastructure group variables + include_vars: ../../../../group_vars/infrastructure.yml + tasks: + - name: "Include prepare-strimzi-kafka-operator role" + include_role: + name: "prepare-strimzi-kafka-operator" diff --git a/ansible/roles/strimzi-kafka-operator/molecule/default/tests/test_default.py b/ansible/roles/strimzi-kafka-operator/molecule/default/tests/test_default.py new file mode 100644 index 00000000..0a317da4 --- /dev/null +++ b/ansible/roles/strimzi-kafka-operator/molecule/default/tests/test_default.py @@ -0,0 +1,6 @@ +def test_helm_value_file(host): + f = host.file('/opt/onap/strimzi_kafka.yaml') + assert f.exists + assert f.user == 'root' + assert f.group == 'root' + assert f.content_string.strip() == "watchAnyNamespace: true" diff --git a/ansible/roles/strimzi-kafka-operator/molecule/ubuntu/molecule.yml b/ansible/roles/strimzi-kafka-operator/molecule/ubuntu/molecule.yml new file mode 100644 index 00000000..8537ca41 --- /dev/null +++ b/ansible/roles/strimzi-kafka-operator/molecule/ubuntu/molecule.yml @@ -0,0 +1,31 @@ +--- +dependency: + name: galaxy +driver: + name: docker +lint: | + set -e + yamllint . + ansible-lint . + flake8 +platforms: + - name: infrastructure-ubuntu-strimzi-kafka-operator + image: ubuntu:18.04 + groups: + - infrastructure +provisioner: + name: ansible + env: + ANSIBLE_ROLES_PATH: ../../../../test/roles + ANSIBLE_LIBRARY: ../../../../library + inventory: + group_vars: + all: + app_name: onap + app_data_path: "/opt/{{ app_name }}" + playbooks: + prepare: ../default/prepare.yml + converge: ../default/converge.yml +verifier: + name: testinfra + directory: ../default/tests |