diff options
author | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2019-06-10 15:08:02 +0200 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2019-06-12 11:53:03 +0200 |
commit | af72c4aceebc356b63f79e3ec3711319fa179690 (patch) | |
tree | 008a8fefbe2865e1c429fa6d194314d4632eb25f /ansible | |
parent | 3cd75cd8d71f471a0217f525bb8e4ed5315266a8 (diff) |
Add tests for custom ntp authority mode in 'chrony' role
By default 'infra' node is set up as a time authority
for nodes. This patch adds tests for alternative supported
scenario where external time authority service is given.
Change-Id: I114418e79fa90b3af1c62a148ca91af3acf2bb2b
Issue-ID: OOM-1810
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'ansible')
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/ |