summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
authorSamuli Silvius <s.silvius@partner.samsung.com>2019-06-24 10:12:59 +0000
committerGerrit Code Review <gerrit@onap.org>2019-06-24 10:12:59 +0000
commit70f9f3024318d7e85c3dabe430175dcf03540a0e (patch)
tree1bbff63bac1f9c820dfd7c787d7c38c2a413da55 /ansible
parentb86dfe843f17915af50746ef28bdeef7be700780 (diff)
parentaf72c4aceebc356b63f79e3ec3711319fa179690 (diff)
Merge "Add tests for custom ntp authority mode in 'chrony' role"
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/chrony/molecule/external_time_source/molecule.yml49
-rw-r--r--ansible/roles/chrony/molecule/external_time_source/playbook.yml10
-rw-r--r--ansible/roles/chrony/molecule/external_time_source_ubuntu/molecule.yml50
3 files changed, 109 insertions, 0 deletions
diff --git a/ansible/roles/chrony/molecule/external_time_source/molecule.yml b/ansible/roles/chrony/molecule/external_time_source/molecule.yml
new file mode 100644
index 00000000..e38f4295
--- /dev/null
+++ b/ansible/roles/chrony/molecule/external_time_source/molecule.yml
@@ -0,0 +1,49 @@
+---
+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
+ inventory:
+ group_vars:
+ all:
+ timesync:
+ servers:
+ - 0.pool.ntp.org
+ - 1.pool.ntp.org
+ timezone: Europe/Warsaw
+ playbooks:
+ prepare: ../default/prepare.yml
+verifier:
+ name: testinfra
+ lint:
+ name: flake8
+ options:
+ v: 1
+ directory: ../default/tests/
diff --git a/ansible/roles/chrony/molecule/external_time_source/playbook.yml b/ansible/roles/chrony/molecule/external_time_source/playbook.yml
new file mode 100644
index 00000000..7dccfc35
--- /dev/null
+++ b/ansible/roles/chrony/molecule/external_time_source/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/external_time_source_ubuntu/molecule.yml b/ansible/roles/chrony/molecule/external_time_source_ubuntu/molecule.yml
new file mode 100644
index 00000000..6cc2854a
--- /dev/null
+++ b/ansible/roles/chrony/molecule/external_time_source_ubuntu/molecule.yml
@@ -0,0 +1,50 @@
+---
+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
+ inventory:
+ group_vars:
+ all:
+ timesync:
+ servers:
+ - 0.pool.ntp.org
+ - 1.pool.ntp.org
+ timezone: Europe/Warsaw
+ playbooks:
+ prepare: ../default/prepare.yml
+ converge: ../external_time_source/playbook.yml
+verifier:
+ name: testinfra
+ lint:
+ name: flake8
+ options:
+ v: 1
+ directory: ../default/tests/