Autocreate CephAnsibleFetchDirectoryBackup
Originally the playbook failed to make user aware that they need to create the CephAnsibleFetchDirectoryBackup. However, if they specified the path, then they should know about the directory. Autocreate it so that the user only needs to specify a path. Change-Id: I06eca1cf8987c9366492973cbe861e1a6b47f744
This commit is contained in:
parent
62f0c612f2
commit
7f6f64b8be
@ -482,9 +482,11 @@ outputs:
|
||||
stat: path="{{local_ceph_ansible_fetch_directory_backup}}"
|
||||
register: local_backup_directory
|
||||
ignore_errors: True
|
||||
- name: ensure requested local back up directory exists
|
||||
fail:
|
||||
msg: "Process runing Ansible is unable to stat LocalCephAnsibleFetchDirectoryBackup: {{local_ceph_ansible_fetch_directory_backup}}"
|
||||
- name: autocreate new directory for ceph-ansible fetch directory backup
|
||||
file:
|
||||
path: "{{local_ceph_ansible_fetch_directory_backup}}"
|
||||
state: directory
|
||||
mode: 0700
|
||||
when: local_backup_directory.stat.exists == False
|
||||
- name: look for tarball of ceph-ansible fetch directory in local backup
|
||||
stat: path="{{local_ceph_ansible_fetch_directory_backup}}/{{ceph_ansible_tarball_name}}"
|
||||
|
Loading…
Reference in New Issue
Block a user