b01291b832
Change-Id: I560332f0b641dab1b18c88d4e4241668c903c1ec
39 lines
779 B
YAML
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'
|