We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ea24a3 commit d6c7c4fCopy full SHA for d6c7c4f
files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml
@@ -739,11 +739,18 @@
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 }}"
745
+ with_items:
746
+ - /export/home/delphix
747
+ - /var/lib/postgresql
748
+ register: dir_check
749
+
750
+# Update the permissions of the directory only if it exists
751
+- file:
752
+ path: "{{ item.stat.path }}"
753
state: directory
754
mode: 0750
- with_items:
- - /export/home/delphix
- - /export/home/cli
- - /var/lib/postgresql
755
+ when: item.stat.exists
756
+ with_items: "{{ dir_check.results }}"
0 commit comments