summaryrefslogtreecommitdiffstats
path: root/ansible/roles/chrony/molecule
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2019-04-02 15:39:25 +0200
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2019-04-16 16:11:02 +0200
commitf7bcc11eecf16a3565286ea3ae95bbd679fa6135 (patch)
tree61071b71af304eb91a2238cc8506b0858b4f960a /ansible/roles/chrony/molecule
parentcceed25e6c773c18e479e246ddeadebc82870f70 (diff)
Molecule tests for chrony role
Change-Id: I2cfee4ef44b1aa0ddff0b5d93712390988846c90 Issue-ID: OOM-1710 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'ansible/roles/chrony/molecule')
-rw-r--r--ansible/roles/chrony/molecule/default/molecule.yml38
-rw-r--r--ansible/roles/chrony/molecule/default/playbook.yml10
-rw-r--r--ansible/roles/chrony/molecule/default/prepare.yml6
-rw-r--r--ansible/roles/chrony/molecule/ubuntu/molecule.yml39
4 files changed, 93 insertions, 0 deletions
diff --git a/ansible/roles/chrony/molecule/default/molecule.yml b/ansible/roles/chrony/molecule/default/molecule.yml
new file mode 100644
index 00000000..a5b48674
--- /dev/null
+++ b/ansible/roles/chrony/molecule/default/molecule.yml
@@ -0,0 +1,38 @@
+---
+dependency:
+ name: galaxy
+driver:
+ name: docker
+lint:
+ name: yamllint
+platforms:
+ - name: infra_host
+ image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
+ pre_build_image: True
+ privileged: true
+ volume_mounts:
+ - "/sys/fs/cgroup:/sys/fs/cgroup:ro"
+ override_command: False
+ groups:
+ - infrastructure
+ - name: node0
+ image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
+ pre_build_image: True
+ privileged: true
+ volume_mounts:
+ - "/sys/fs/cgroup:/sys/fs/cgroup:ro"
+ override_command: False
+ groups:
+ - kubernetes
+provisioner:
+ name: ansible
+ lint:
+ name: ansible-lint
+ env:
+ ANSIBLE_ROLES_PATH: ../../../../test/roles
+verifier:
+ name: testinfra
+ lint:
+ name: flake8
+ options:
+ v: 1
diff --git a/ansible/roles/chrony/molecule/default/playbook.yml b/ansible/roles/chrony/molecule/default/playbook.yml
new file mode 100644
index 00000000..7dccfc35
--- /dev/null
+++ b/ansible/roles/chrony/molecule/default/playbook.yml
@@ -0,0 +1,10 @@
+---
+- name: Converge infrastructure hosts
+ hosts: infrastructure
+ roles:
+ - chrony
+
+- name: Converge kubernetes hosts
+ hosts: kubernetes
+ roles:
+ - chrony
diff --git a/ansible/roles/chrony/molecule/default/prepare.yml b/ansible/roles/chrony/molecule/default/prepare.yml
new file mode 100644
index 00000000..73582dd3
--- /dev/null
+++ b/ansible/roles/chrony/molecule/default/prepare.yml
@@ -0,0 +1,6 @@
+---
+- name: Setup all hosts for playing chrony role
+ hosts: all
+
+ roles:
+ - prepare-chrony
diff --git a/ansible/roles/chrony/molecule/ubuntu/molecule.yml b/ansible/roles/chrony/molecule/ubuntu/molecule.yml
new file mode 100644
index 00000000..dd2b9655
--- /dev/null
+++ b/ansible/roles/chrony/molecule/ubuntu/molecule.yml
@@ -0,0 +1,39 @@
+---
+dependency:
+ name: galaxy
+driver:
+ name: docker
+lint:
+ name: yamllint
+platforms:
+ - name: infra_host-ubuntu
+ image: molecule-${PREBUILD_PLATFORM_DISTRO:-ubuntu}:${PREBUILD_DISTRO_VERSION:-18.04}
+ pre_build_image: True
+ privileged: true
+ volume_mounts:
+ - "/sys/fs/cgroup:/sys/fs/cgroup:ro"
+ override_command: False
+ groups:
+ - infrastructure
+ - name: node0-ubuntu
+ image: molecule-${PREBUILD_PLATFORM_DISTRO:-ubuntu}:${PREBUILD_DISTRO_VERSION:-18.04}
+ pre_build_image: True
+ privileged: true
+ volume_mounts:
+ - "/sys/fs/cgroup:/sys/fs/cgroup:ro"
+ override_command: False
+ groups:
+ - 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