Ensure ~/.config exists

The playbook that generated clouds.yaml expected ~/.config
to exist in the user's home directory, however it might not
and we need to ensure that prior to attempting to create
~/.config/openstack in order to write the file.

Change-Id: Ic37a40bc289cdf63edd6a54988831634e381e236
This commit is contained in:
Julia Kreger 2017-06-06 12:13:14 +00:00
parent 84fdd08503
commit 762f4c78ca
1 changed files with 8 additions and 1 deletions

View File

@ -31,7 +31,14 @@
- "{{ config_region_name is defined }}"
- "{{ config_auth_url is defined }}"
- name: "Ensure the ~/.config/openstack/ exists"
- name: "Ensure the ~/.config exists"
file:
name: "~{{ user | default('root') }}/.config"
state: directory
owner: "{{ user | default('root') }}"
mode: 0700
- name: "Ensure ~/.config/openstack/ exists"
file:
name: "~{{ user | default('root') }}/.config/openstack"
state: directory