From b5eb53f60e06dde8af4b4c88389340fc5785b8ed Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 10 Jan 2018 19:47:06 +0000 Subject: [PATCH] Check whether image cache directory is writeable --- ansible/kolla-openstack.yml | 4 +++- ansible/overcloud-ipa-images.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ansible/kolla-openstack.yml b/ansible/kolla-openstack.yml index cf8abca30..40752c464 100644 --- a/ansible/kolla-openstack.yml +++ b/ansible/kolla-openstack.yml @@ -60,7 +60,9 @@ owner: "{{ lookup('env', 'USER') }}" group: "{{ lookup('env', 'USER') }}" become: True - when: not image_cache_stat.stat.exists + when: >- + not image_cache_stat.stat.exists or + not image_cache_stat.stat.writeable - name: Ensure Ironic Python Agent images are copied onto the local machine fetch: diff --git a/ansible/overcloud-ipa-images.yml b/ansible/overcloud-ipa-images.yml index 7c0ee8f5b..e32829b25 100644 --- a/ansible/overcloud-ipa-images.yml +++ b/ansible/overcloud-ipa-images.yml @@ -76,7 +76,9 @@ owner: "{{ ansible_user }}" group: "{{ ansible_user }}" become: True - when: not image_cache_stat.stat.exists + when: >- + not image_cache_stat.stat.exists or + not image_cache_stat.stat.writeable - name: Ensure locally built Ironic Python Agent (IPA) images are copied copy: