blob: 33442e4b925e0b3cebd113e05162e6938b07a31a [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 Log Directories for HDFS Purge
file:
path: "{{ item }}"
state: directory
mode: 0755
owner: hdfs
group: hdfs
with_items:
- /var/log/bro-purge
- /var/log/yaf-purge
- /var/log/snort-purge
- name: Create Empty Log Files for HDFS Purge
file:
path: "{{ item }}"
state: touch
owner: hdfs
group: hdfs
mode: 0644
with_items:
- /var/log/bro-purge/cron-hdfs-bro-purge.log
- /var/log/yaf-purge/cron-hdfs-yaf-purge.log
- /var/log/snort-purge/cron-hdfs-snort-purge.log
- name: Purge HDFS Sensor Data every 30 days.
cron:
name: "{{ item.name }}"
job: "{{ item.job }}"
special_time: daily
user: hdfs
with_items:
- { name: "bro_hdfs_purge", job: "{{ hdfs_bro_purge_cronjob }}" }
- { name: "yaf_hdfs_purge", job: "{{ hdfs_yaf_purge_cronjob }}" }
- { name: "snort_hdfs_purge", job: "{{ hdfs_snort_purge_cronjob }}" }