Ensure /var/lib/iscsi actually exists before mounting it

Change I803ed2ba9ff52f9a02c550a28d21cc9102568c8e adds this directory
as bind-mount for many services, but there is no guarantee this directory
actually exists on the node.

This might break the deploy, as it will prevent the iscsi container to
start as expected when using podman.

Although this directory is managed by a package (iscsi-initiator-utils),
this one isn't always present (i.e. on undercloud, or deployed servers,
or standalone).

Related-Bug: #1810338
Change-Id: I8fc52b2a872fd77b342a0f20e4602b21d9e33fed
This commit is contained in:
Cédric Jeanneret 2019-01-08 11:14:41 +01:00
parent 2ef84d2210
commit a15509f999

@ -109,6 +109,11 @@ outputs:
path: /etc/iscsi
state: directory
setype: svirt_sandbox_file_t
- name: ensure /var/lib/iscsi exists
file:
path: /var/lib/iscsi
state: directory
setype: svirt_sandbox_file_t
- name: stat /lib/systemd/system/iscsid.socket
stat: path=/lib/systemd/system/iscsid.socket
register: stat_iscsid_socket