Major Hayden c4d12eba1b Fix crontab errors on CentOS/SUSE
CentOS comes with a default empty crontab file that is fine for
most deployers. It also lacks the `--report` option for `run-parts`
that Ubuntu has.

SUSE doesn't have run-parts at all.

This causes the server administrator to receive emails with errors
from cron on a regular basis. This patch limits the crontab
deployment to Ubuntu only and skips CentOS/SUSE hosts.

Closes-Bug: 1732762
Change-Id: Iba714e1e20e1a27b1a5bb58a714dee3916faba8f
2017-12-04 14:57:29 +00:00

25 lines
767 B
YAML

---
# Copyright 2015, Rackspace US, Inc.
#
# Licensed 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 crontab
template:
src: "crontab.j2"
dest: "/etc/crontab"
owner: "root"
group: "root"
mode: "0644"
when:
- ansible_os_family == 'Debian'