Skip to content

Commit 47c4760

Browse files
committed
DLPX-86524 Update path in /etc/security/pam_env.conf
1 parent 1a0b53f commit 47c4760

File tree

1 file changed

+12
-5
lines changed
  • files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks

1 file changed

+12
-5
lines changed

files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -720,10 +720,17 @@
720720
when: not ansible_is_chroot
721721

722722
#
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.
724726
#
725727
- 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*='

0 commit comments

Comments
 (0)