You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2022/08/05 19:42:17 UTC
[airavata] branch master updated: Ansible: only create user_data_dir symlink when it doesn't exist
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/master by this push:
new 45b606590d Ansible: only create user_data_dir symlink when it doesn't exist
45b606590d is described below
commit 45b606590d567273013658a51ecac924559e3107
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Fri Aug 5 15:42:08 2022 -0400
Ansible: only create user_data_dir symlink when it doesn't exist
---
dev-tools/ansible/roles/httpd/tasks/main.yml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dev-tools/ansible/roles/httpd/tasks/main.yml b/dev-tools/ansible/roles/httpd/tasks/main.yml
index 4c9803bb40..dd97fb3ab8 100644
--- a/dev-tools/ansible/roles/httpd/tasks/main.yml
+++ b/dev-tools/ansible/roles/httpd/tasks/main.yml
@@ -59,11 +59,15 @@
file: path="{{ real_user_data_dir }}" state=directory owner="{{user}}" group="{{group}}"
become: yes
+- name: get realpath of {{ user_data_dir }}
+ command: realpath {{ user_data_dir }}
+ register: user_data_dir_realpath
+
# TODO: create the parent directory of the symlink if missing
- name: Symlink user data dir {{ user_data_dir }} to {{ real_user_data_dir }}
file: src="{{ real_user_data_dir }}" dest="{{ user_data_dir }}" state=link owner="{{user}}" group="{{group}}"
become: yes
- when: user_data_dir != real_user_data_dir
+ when: user_data_dir_realpath.stdout != real_user_data_dir
- name: set selinux context to allow read/write on the user data directory ({{ user_data_dir }})
sefcontext: