blob: 22616ca46df4404ca00d9b81bb5868e8d5353259 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
- name: Create Empty Log Files for ES Purge
file:
path: "{{ item }}"
state: touch
owner: hdfs
group: hdfs
mode: 0644
with_items:
- /var/log/bro-purge/cron-es-bro-purge.log
- /var/log/yaf-purge/cron-es-yaf-purge.log
- /var/log/snort-purge/cron-es-snort-purge.log
- name: Purge Elasticsearch Indices every 30 days.
cron:
name: "{{ item.name }}"
job: "{{ item.job }}"
special_time: daily
user: hdfs
with_items:
- { name: "bro_es_purge", job: "{{ es_bro_purge_cronjob }}" }
- { name: "yaf_es_purge", job: "{{ es_yaf_purge_cronjob }}" }
- { name: "snort_es_purge", job: "{{ es_snort_purge_cronjob }}" }