summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2019-06-06 07:06:27 -0700
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2019-06-07 15:16:50 +0200
commitca30ffa426b70509ba0ac6a7a5b6fa6aff050922 (patch)
tree1042c75a9bd893abd8f7e5022f7ac3e9b7234097 /ansible
parentd1088fc28c9625944ee24eca330f12f504be4529 (diff)
Add role level tests for 'nexus' role
Change-Id: If8decc241614e4fe802352cc783b59f8d7ec70b4 Issue-ID: OOM-1915 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/nexus/.yamllint11
-rw-r--r--ansible/roles/nexus/molecule/default/molecule.yml30
-rw-r--r--ansible/roles/nexus/molecule/default/playbook.yml11
-rw-r--r--ansible/roles/nexus/molecule/default/prepare.yml8
4 files changed, 60 insertions, 0 deletions
diff --git a/ansible/roles/nexus/.yamllint b/ansible/roles/nexus/.yamllint
new file mode 100644
index 00000000..ad0be760
--- /dev/null
+++ b/ansible/roles/nexus/.yamllint
@@ -0,0 +1,11 @@
+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/nexus/molecule/default/molecule.yml b/ansible/roles/nexus/molecule/default/molecule.yml
new file mode 100644
index 00000000..63c47724
--- /dev/null
+++ b/ansible/roles/nexus/molecule/default/molecule.yml
@@ -0,0 +1,30 @@
+---
+dependency:
+ name: galaxy
+driver:
+ name: docker
+lint:
+ name: yamllint
+platforms:
+ - name: infrastructure-server
+ image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
+ pre_build_image: true
+ privileged: true
+ override_command: false
+ volumes:
+ - /var/lib/docker
+ groups:
+ - infrastructure
+provisioner:
+ name: ansible
+ env:
+ ANSIBLE_ROLES_PATH: ../../../../test/roles
+ inventory:
+ links:
+ group_vars: ../../../../group_vars
+ lint:
+ name: ansible-lint
+verifier:
+ name: testinfra
+ lint:
+ name: flake8
diff --git a/ansible/roles/nexus/molecule/default/playbook.yml b/ansible/roles/nexus/molecule/default/playbook.yml
new file mode 100644
index 00000000..e10ea55b
--- /dev/null
+++ b/ansible/roles/nexus/molecule/default/playbook.yml
@@ -0,0 +1,11 @@
+---
+- name: Converge
+ hosts: all
+ vars:
+ nexus_port: ":8081"
+ nexus3_published_ports:
+ - "{{ '8081' + nexus_port }}"
+ nexus_url_scheme: http
+ populate_nexus: true
+ roles:
+ - nexus
diff --git a/ansible/roles/nexus/molecule/default/prepare.yml b/ansible/roles/nexus/molecule/default/prepare.yml
new file mode 100644
index 00000000..f7290bd5
--- /dev/null
+++ b/ansible/roles/nexus/molecule/default/prepare.yml
@@ -0,0 +1,8 @@
+---
+- name: Prepare
+ hosts: all
+ vars_files:
+ - ../../defaults/main.yml
+ roles:
+ - prepare-docker-dind
+ - prepare-nexus