summaryrefslogtreecommitdiffstats
path: root/playbooks/aws/openshift-cluster
diff options
context:
space:
mode:
authorTroy Dawson <tdawson@redhat.com>2015-08-27 10:27:46 -0500
committerTroy Dawson <tdawson@redhat.com>2015-08-27 15:19:45 -0500
commitf0d03d257f2186c91e99c06e34be737468ea6ad6 (patch)
treebe5ad866e94abe66ed76aad2f98a31ae8229f645 /playbooks/aws/openshift-cluster
parent5c7e1366ad8ae67ef23117d296a65a6ee81ccd29 (diff)
downloadopenshift-f0d03d257f2186c91e99c06e34be737468ea6ad6.tar.gz
openshift-f0d03d257f2186c91e99c06e34be737468ea6ad6.tar.bz2
openshift-f0d03d257f2186c91e99c06e34be737468ea6ad6.tar.xz
openshift-f0d03d257f2186c91e99c06e34be737468ea6ad6.zip
Add a role that allows logrotate config editing.
This role gets called for each type of machine, but if logrotate_scripts is not set, nothing happens.
Diffstat (limited to 'playbooks/aws/openshift-cluster')
-rw-r--r--playbooks/aws/openshift-cluster/tasks/launch_instances.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
index e9ebc3e02..b77bcdc1a 100644
--- a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
@@ -159,6 +159,22 @@
type: "{{host_type}}"
when: host_type != "node"
+- set_fact:
+ logrotate:
+ - name: syslog
+ path: "/var/log/cron
+ \n/var/log/maillog
+ \n/var/log/messages
+ \n/var/log/secure
+ \n/var/log/spooler \n"
+ options:
+ - daily
+ - rotate 7
+ - compress
+ - sharedscripts
+ scripts:
+ postrotate: "/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true"
+
- name: Add new instances groups and variables
add_host:
hostname: "{{ item.0 }}"
@@ -169,6 +185,7 @@
ec2_private_ip_address: "{{ item.1.private_ip }}"
ec2_ip_address: "{{ item.1.public_ip }}"
openshift_node_labels: "{{ node_label }}"
+ logrotate_scripts: "{{ logrotate }}"
with_together:
- instances
- ec2.instances