role: Do not escalate privileges for creating base directories
Otherwise we can end up doing something like escalating privileges for creating directories in /tmp/ and then the regular user won't have access to them. We can revisit this later if need be. Change-Id: Ieb33c23f2d278ed1156a8bc2d39c41bb9b4bb6f6
This commit is contained in:
parent
5f628b8877
commit
f8e31af454
@ -54,21 +54,18 @@
|
||||
# The following tasks dynamically enable escalated privileges only when the
|
||||
# directory to create is not located in the user's home directory.
|
||||
- name: Ensure ara_api_root_dir exists
|
||||
become: "{{ (ansible_user_dir in ara_api_root_dir) | ternary(false, true) }}"
|
||||
file:
|
||||
path: "{{ ara_api_root_dir }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: Ensure ara_api_base_dir exists
|
||||
become: "{{ (ansible_user_dir in ara_api_base_dir) | ternary(false, true) }}"
|
||||
file:
|
||||
path: "{{ ara_api_base_dir }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
|
||||
- name: Ensure ara_api_log_dir exists
|
||||
become: "{{ (ansible_user_dir in ara_api_log_dir) | ternary(false, true) }}"
|
||||
file:
|
||||
path: "{{ ara_api_log_dir }}"
|
||||
state: directory
|
||||
|
Loading…
x
Reference in New Issue
Block a user