File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 720
720
when : not ansible_is_chroot
721
721
722
722
#
723
- # Ensure /snap/bin is removed from PATH in /etc/environment
723
+ # Add the correct path to /etc/security/pam_env.conf and remove any invalid
724
+ # paths from /etc/environment to ensure that non-existent paths are not
725
+ # included in the global PATH.
724
726
#
725
727
- lineinfile :
726
- path : /etc/environment
727
- regexp : ' ^PATH='
728
- line : " {{ lookup('file', '/etc/environment') | regex_search('^PATH=.*') | regex_replace(':/snap/bin', '') }}"
729
- when : " '/snap/bin' in lookup('file', '/etc/environment')"
728
+ path : /etc/security/pam_env.conf
729
+ state : present
730
+ regexp : ' ^\s*PATH\s+DEFAULT='
731
+ line : ' PATH DEFAULT=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin'
732
+
733
+ - lineinfile :
734
+ path : /etc/environment
735
+ state : absent
736
+ regexp : ' ^\s*PATH\s*='
You can’t perform that action at this time.
0 commit comments