diff --git a/roles/backup/templates/s3backup.sh b/roles/backup/templates/s3backup.sh index 37fed9e..8d1e6b4 100644 --- a/roles/backup/templates/s3backup.sh +++ b/roles/backup/templates/s3backup.sh @@ -33,7 +33,18 @@ declare -a DIRS {% for item in backup_s3backup_list + backup_s3backup_list_extra %} DIRS+=("{{ item }}") {% endfor %} -# End directories +# End directory manual configuration + +# If we have ostree, add diff'd configs to the list, too +if command -v ostree > /dev/null 2>&1; then + for file in $( + ostree admin config-diff 2>/dev/null | \ + grep -e '^[A|M]' | \ + awk '{print $2}' + ); do + DIRS+=("/etc/$file") + done +fi # Tar up all items in the backup list, recursively, and pipe them straight # up to S3