Skip to content

feat(cron): set permissions on cron scripts/jobs to splunk #174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions roles/splunk/tasks/add_crashlog_script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
template:
src: cleanup_crashlogs.sh.j2
dest: "{{ splunk_home }}/cleanup_crashlogs.sh"
owner: root
group: root
owner: "{{ splunk_nix_user }}"
group: "{{ splunk_nix_group }}"
mode: 0755
become: true

- name: Configure cron to run cleanup_crashlogs.sh daily at midnight
cron:
name: "Run cleanup_crashlogs.sh"
state: present
cron_file: cleanup_crashlogs
user: "{{ splunk_nix_user }}"
job: "{{ splunk_home }}/cleanup_crashlogs.sh"
hour: 0
minute: 0
Expand Down
6 changes: 4 additions & 2 deletions roles/splunk/tasks/add_diag_script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
template:
src: cleanup_diags.sh.j2
dest: "{{ splunk_home }}/cleanup_diags.sh"
owner: root
group: root
owner: "{{ splunk_nix_user }}"
group: "{{ splunk_nix_group }}"
mode: 0755
become: true

- name: Configure cron to run cleanup_diags.sh daily at midnight
cron:
name: "Run cleanup_diags.sh"
state: present
cron_file: cleanup_diags
user: "{{ splunk_nix_user }}"
job: "{{ splunk_home }}/cleanup_diags.sh"
hour: 0
minute: 0
Expand Down