From f38bb6af00738881773304ebb5d983b6bd247a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Mon, 25 Jun 2018 10:57:44 +0200 Subject: [PATCH] fix #1: make sure /var/lib/docker is backed by XFS --- prepare.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/prepare.yml b/prepare.yml index 7905550..69c05f9 100644 --- a/prepare.yml +++ b/prepare.yml @@ -108,6 +108,23 @@ state: installed tags: rpm,docker + - name: Find the filesystem hosting /var/lib/docker + command: df -k /var/lib/docker + register: df + changed_when: false + tags: docker + + - name: Make sure the filesystem hosting /var/lib/docker is formatted as XFS + assert: + that: + - 'docker_filesystem == ''xfs''' + msg: "The filesystem holding /var/lib/docker must be formatted as XFS" + vars: + docker_mount_point: '{{ df.stdout_lines[1].split()[5] }}' + # TODO: replace match with "equalto" as soon as the Jinja shipped with RHEL is updated + docker_filesystem: '{{ ansible_mounts|selectattr(''mount'', ''match'', ''^'' ~ docker_mount_point ~ ''$'')|map(attribute=''fstype'' )|first }}' + tags: docker + - name: Stop Docker service: name: docker