We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ea24a3 commit 38b7ceaCopy full SHA for 38b7cea
files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml
@@ -739,11 +739,19 @@
739
state: absent
740
regexp: '^\s*PATH\s*='
741
742
-- file:
+# Check if the specified directories exist to update the permissions
743
+- stat:
744
path: "{{ item }}"
- state: directory
745
- mode: 0750
746
with_items:
747
- /export/home/delphix
748
- /export/home/cli
749
- /var/lib/postgresql
+ register: dir_check
750
+
751
+# Update the permissions of the directory only if it exists
752
+- file:
753
+ path: "{{ item.stat.path }}"
754
+ state: directory
755
+ mode: 0750
756
+ when: item.stat.exists
757
+ with_items: "{{ dir_check.results }}"
0 commit comments