Skip to content

Commit

Permalink
make log directory a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Jan 18, 2015
1 parent b2e829a commit 29fd475
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion roles/syslog-aggregator/tasks/main.yml
Expand Up @@ -24,7 +24,7 @@
cron:
name: log-cleanup
user: root
job: "find /data/log -mtime +28 -type f -exec ls {} \\;"
job: "find {{ log_root }} -mtime +28 -type f -exec ls {} \\;"
minute: 0
hour: 0
state: present
Expand Down
Expand Up @@ -10,7 +10,7 @@ source src_net {
};

destination per_host {
file("/data/log/$HOST/$YEAR-$MONTH-$DAY.log"
file("{{ log_root }}/$HOST/$YEAR-$MONTH-$DAY.log"
owner(root)
group(root)
perm(0644)
Expand Down
2 changes: 2 additions & 0 deletions roles/syslog-aggregator/vars/main.yml
@@ -0,0 +1,2 @@
---
log_root: /data/log

0 comments on commit 29fd475

Please sign in to comment.