Skip to content

Commit

Permalink
DLPX-86537 Moved changes to files of etc folder
Browse files Browse the repository at this point in the history
  • Loading branch information
dbshah12 committed Oct 3, 2024
1 parent fe3b417 commit 8ee46c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 34 deletions.
7 changes: 7 additions & 0 deletions files/common/etc/logrotate.d/sudo-log
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/var/log/sudo.log {
weekly
rotate 4
compress
missingok
notifempty
}
2 changes: 2 additions & 0 deletions files/common/etc/sudoers.d/delphix
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
#

delphix ALL=(ALL) NOPASSWD:ALL
Defaults use_pty
Defaults logfile='/var/log/sudo.log'
Original file line number Diff line number Diff line change
Expand Up @@ -738,37 +738,3 @@
path: /etc/environment
state: absent
regexp: '^\s*PATH\s*='


#
# Ensure Defaults use_pty is set in /etc/sudoers
#
- lineinfile:
path: /etc/sudoers
state: present
regexp: '^Defaults use_pty'
line: 'Defaults use_pty'

#
# Ensure Defaults logfile is set in /etc/sudoers
#
- lineinfile:
path: /etc/sudoers
state: present
regexp: '^Defaults logfile=/var/log/sudo.log'
line: 'Defaults logfile=/var/log/sudo.log'

#
# Create logrotate configuration for sudo.log
#
- copy:
dest: /etc/logrotate.d/sudo-log
content: |
/var/log/sudo.log {
weekly
rotate 4
compress
missingok
notifempty
}
mode: '0644'

0 comments on commit 8ee46c4

Please sign in to comment.