Initial commit of PVC Ansible role
This commit is contained in:
4
roles/base/templates/var/backups/ssh/authorized_keys.j2
Normal file
4
roles/base/templates/var/backups/ssh/authorized_keys.j2
Normal file
@ -0,0 +1,4 @@
|
||||
# backup user authorized_keys
|
||||
# {{ ansible_managed }}
|
||||
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCnndMxkLF+Trm7Zpo59daJbH6C6SbInl8f1PAizxtUkWg8skP5EXkUc0eguos+5o6BG1VL0c8SWBnl4smvZL075l2wC3+cJeDUIyxC6aue6vualFMPj5p0h4gJWrX+L5r1b1hxnR3r5Mqx7/2W9K35/u3M6TPnRXn0XjGN93j8dsywfDOuU4xH+w0INM4iNeEne4l2SEAVA0Sm7nGNss4X18iwjnxyKgqUB+HtG2WHyEPr/Uv5OiEC+4n4LvkMRMpupx33U5ZH7pgyfFKJJsIObBf4nC4xUUZyCG2FlHiWzX0Ua9xxwz9OJIeqlwfYsLFrHEbPS5KpAXukEjshKGY1 backuppc@base.bonilan.net
|
11
roles/base/templates/var/backups/timestamp.sh.j2
Executable file
11
roles/base/templates/var/backups/timestamp.sh.j2
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Writes timestamps on successful BackupPC completion and updates dynamic share inventory for this host
|
||||
# {{ ansible_managed }}
|
||||
|
||||
OK="$1"
|
||||
SHARE="$2"
|
||||
grep -F "${SHARE}" /var/backups/shares || echo "${SHARE}" >> /var/backups/shares
|
||||
if [[ ${OK} -eq 1 ]]; then
|
||||
/bin/date +%s > ${SHARE}/.backup
|
||||
fi
|
Reference in New Issue
Block a user