From d2ca24eca8849a8f2df748c3f7c4e0d6885b6298 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 9 Oct 2018 16:45:05 -0400 Subject: [PATCH] tests: do not install lvm2 on atomic host we need to detect whether we are running on atomic host to not try to install lvm2 package. Signed-off-by: Guillaume Abrioux --- tests/functional/lvm_setup.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/functional/lvm_setup.yml b/tests/functional/lvm_setup.yml index ef30614eb..c6908a4be 100644 --- a/tests/functional/lvm_setup.yml +++ b/tests/functional/lvm_setup.yml @@ -1,15 +1,30 @@ --- - hosts: osds - gather_facts: true + gather_facts: false become: yes tasks: + - name: check if it is atomic host + stat: + path: /run/ostree-booted + register: stat_ostree + tags: + - always + + - name: set_fact is_atomic + set_fact: + is_atomic: '{{ stat_ostree.stat.exists }}' + tags: + - always + # Some images may not have lvm2 installed - name: install lvm2 package: name: lvm2 state: present + when: + - not is_atomic - name: create physical volume command: pvcreate /dev/sdb -- 2.39.5