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 4, 2024
1 parent fe3b417 commit 51daad5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 35 deletions.
10 changes: 10 additions & 0 deletions files/common/etc/logrotate.d/sudo-log
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright 2024 Delphix
#
/var/log/sudo.log {
weekly
rotate 4
compress
missingok
notifempty
}
4 changes: 3 additions & 1 deletion files/common/etc/sudoers.d/delphix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2018 Delphix
# Copyright 2018, 2024 Delphix
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -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 51daad5

Please sign in to comment.