Skip to content
Snippets Groups Projects
Commit 446c8848 authored by Jörg Sachse's avatar Jörg Sachse
Browse files

test: increase Molecule test coverage by checking for specific ESXi hypervisor...

test: increase Molecule test coverage by checking for specific ESXi hypervisor only on tasks that absolutely need it
parent eadf1971
No related branches found
No related tags found
No related merge requests found
Pipeline #7368 failed
......@@ -25,9 +25,11 @@
- name: NTP-Client
ansible.builtin.import_tasks: "migrate_ntpd_to_esxi_timesync.yml"
when: # implicit AND when passing a list
- ansible_facts.virtualization_role == "guest"
- ansible_facts.virtualization_type == "VMware"
# We want to keep Chrony/NTPd von physical machines, so this will only ever
# need to be executed on VMs. Physical hosts will have
# ansible_facts.virtualization_role: "host"
# in their facts.
when: ansible_facts.virtualization_role == "guest"
tags: [ntp, ntpd, time]
- name: Systempakete installieren
......
......@@ -27,6 +27,16 @@
- "/etc/ntp.conf"
- "/etc/ntpsec/ntp.conf"
- name: configure ESXi based time synchronisation
when: ansible_facts.virtualization_type == "VMware"
# This whole set of tasks is skipped in Molecule tests, because they
# usually don't run on ESXi hypervisors here at SLUB during local tests or
# in CI. It is indeed tempting to check for other hypervisors here, but it
# doesn't make any sense, because the tasks are strictly bound to technolo-
# gies that work ONLY with ESXi, so using something like:
# ansible_facts.virtualization_type == "virtualbox"
# will not save you. Just don't.
block:
# details can be found at sdvgubs10 project, issue #2
# https://git.slub-dresden.de/slub-referat-2-4/sdvgubs10
- name: make sure open-vm-tools are installed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment