system-config/playbooks/roles/rax-dns-backup/tasks/main.yaml
Ian Wienand b01291b832 rax-dns-backup : fix cron output capture
Change-Id: I560332f0b641dab1b18c88d4e4241668c903c1ec
2021-04-15 07:15:09 +10:00

39 lines
779 B
YAML

- name: Ensure configuration file
template:
src: rax-dns-auth.conf.j2
dest: /etc/rax-dns-auth.conf
owner: root
group: root
mode: 0600
- name: Ensure output directory
file:
state: directory
path: /var/lib/rax-dns-backup
owner: root
group: root
mode: 0644
- name: Install backup tool
copy:
src: rax-dns-backup
dest: /usr/local/bin/rax-dns-backup
owner: root
group: root
mode: 0755
- name: Install cron job
cron:
name: 'Backup Rackspace DNS'
state: present
job: '/usr/local/bin/rax-dns-backup >> /var/log/rax-dns-backup.log 2>&1'
hour: '2'
minute: '0'
day: '*'
- name: Install logrotate
include_role:
name: logrotate
vars:
logrotate_file_name: '/var/log/rax-dns-backup.log'