Create stack home folder

The create stack user role creates the home for the stack user,
which works as long as the containing folder already exists.
Since this may not always be the case, create the folder first.

Change-Id: Ibe3539a738340d6e4d95e3661bca5e2067e3e959
This commit is contained in:
Andrea Frittoli 2017-09-22 13:22:34 +01:00 committed by Andrea Frittoli (andreaf)
parent 402044ae45
commit 90aede8794
1 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,16 @@
name: stack
become: yes
# NOTE(andreaf) Create a user home_dir is not safe via
# the user module since it will fail if the containing
# folder does not exists. If the folder does exists and
# it's empty, the skeleton is setup and ownership set.
- name: Create the stack user home folder
file:
path: '{{ devstack_stack_home_dir }}'
state: directory
become: yes
- name: Create stack user
user:
name: stack