41 lines
883 B
YAML
41 lines
883 B
YAML
|
---
|
||
|
- name: ensure backup user has /bin/sh shell
|
||
|
user:
|
||
|
name: backup
|
||
|
shell: /bin/sh
|
||
|
state: present
|
||
|
|
||
|
- name: create backup .ssh configuration directory
|
||
|
file:
|
||
|
dest: /var/backups/.ssh
|
||
|
state: directory
|
||
|
owner: backup
|
||
|
group: operator
|
||
|
mode: 0700
|
||
|
|
||
|
- name: write backup ssh authorized_keys configuration file
|
||
|
template:
|
||
|
src: var/backups/ssh/authorized_keys.j2
|
||
|
dest: /var/backups/.ssh/authorized_keys
|
||
|
owner: backup
|
||
|
group: operator
|
||
|
mode: 0640
|
||
|
|
||
|
- name: install post-backup timestamp script
|
||
|
template:
|
||
|
src: var/backups/timestamp.sh.j2
|
||
|
dest: /var/backups/timestamp.sh
|
||
|
mode: 0755
|
||
|
|
||
|
- name: create backup shares file
|
||
|
command: touch /var/backups/shares
|
||
|
args:
|
||
|
creates: /var/backups/shares
|
||
|
|
||
|
- name: set ownership of backup shares file
|
||
|
file:
|
||
|
dest: /var/backups/shares
|
||
|
owner: backup
|
||
|
group: operator
|
||
|
mode: 0644
|