diff --git a/host_vars/git.yaml b/host_vars/git.yaml index f987f64..9d99495 100644 --- a/host_vars/git.yaml +++ b/host_vars/git.yaml @@ -1,5 +1,5 @@ --- -service-name: git +servicename: git backup: - preare-command: "" + prearecommand: "" folder: "/home/git" diff --git a/roles/backupscript/templates/backupscript.sh b/roles/backupscript/templates/backupscript.sh index 50a6681..4562f36 100644 --- a/roles/backupscript/templates/backupscript.sh +++ b/roles/backupscript/templates/backupscript.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash # {{ansible_managed}} -{{backup.preare-command}} +{{backup.prearecommand}} -time ( rsync -azP --delete {{backup.folder}} backup@192.168.69.26:/mnt/backupstore/{{service-name}}/staging ) +time ( rsync -azP --delete {{backup.folder}} backup@192.168.69.26:/mnt/backupstore/{{servicename}}/staging ) -time ( ssh backup@backup.stargate.internal 'tar -zcvf /mnt/backupstore/{{service-name}}/{{service-name}}-$(date +"%Y-%m-%d").tar.gz -C /mnt/backupstore/{{service-name}}/staging' ) +time ( ssh backup@backup.stargate.internal 'tar -zcvf /mnt/backupstore/{{servicename}}/{{servicename}}-$(date +"%Y-%m-%d").tar.gz -C /mnt/backupstore/{{servicename}}/staging' )