Skip to content

Commit d8b496f

Browse files
committed
DLPX-86524 CIS: remove non-existent paths from the default PATH variable
1 parent 85197a7 commit d8b496f

File tree

1 file changed

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

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,3 +718,12 @@
718718
name: "nullmailer"
719719
state: "stopped"
720720
when: not ansible_is_chroot
721+
722+
#
723+
# Ensure /snap/bin is removed from PATH in /etc/environment
724+
#
725+
- lineinfile:
726+
path: /etc/environment
727+
regexp: '^PATH='
728+
line: "{{ lookup('file', '/etc/environment') | regex_replace(':/snap/bin', '') }}"
729+
when: "'/snap/bin' in lookup('file', '/etc/environment')"

0 commit comments

Comments
 (0)