duplicty - add azure backend
This commit is contained in:
parent
bcbcc6ae59
commit
ce703e5692
@ -7,6 +7,17 @@
|
||||
- duplicity_s3_passphrase is defined
|
||||
- duplicity_s3_access_key is defined
|
||||
- duplicity_s3_secret_key is defined
|
||||
when:
|
||||
- duplicity_backend == s3
|
||||
tags: ['backup_duplicity']
|
||||
|
||||
- name: duplicity | check vars are defined
|
||||
assert:
|
||||
that:
|
||||
- duplicity_archive_dir is defined
|
||||
- duplicity_azure_path is defined
|
||||
when:
|
||||
- duplicity_backend == azure
|
||||
tags: ['backup_duplicity']
|
||||
|
||||
- name: duplicity | install packages
|
||||
@ -217,6 +228,7 @@
|
||||
job: ". /etc/duplicity/duplicity.cnf && duplicity --encrypt-key {{ duplicity_gpg_key }} --s3-use-new-style -v 4 --archive-dir={{ duplicity_archive_dir }} --full-if-older-than {{ duplicity_full_older_than }}D / \"{{ duplicity_s3_path }}\" --exclude-filelist {{ duplicity_exclude_filelist }}"
|
||||
when:
|
||||
- duplicity_gpg_key is defined
|
||||
- duplicity_backend == s3
|
||||
tags: ['backup_duplicity']
|
||||
|
||||
- name: duplicity | create cleanup cronjob
|
||||
@ -231,4 +243,35 @@
|
||||
job: ". /etc/duplicity/duplicity.cnf && duplicity --encrypt-key {{ duplicity_gpg_key }} --force --s3-use-new-style -v 4 remove-older-than {{ duplicity_remove_older_than }}D \"{{ duplicity_s3_path }}\""
|
||||
when:
|
||||
- duplicity_gpg_key is defined
|
||||
- duplicity_backend == s3
|
||||
tags: ['backup_duplicity']
|
||||
|
||||
- name: duplicity | create backup cronjob
|
||||
cron:
|
||||
name: duplicity backup
|
||||
minute: "{{ duplicity_cron_backup_minute }}"
|
||||
hour: "{{ duplicity_cron_backup_hour }}"
|
||||
day: "{{ duplicity_cron_backup_day }}"
|
||||
month: "{{ duplicity_cron_backup_month }}"
|
||||
weekday: "{{ duplicity_cron_backup_weekday }}"
|
||||
user: "{{ duplicity_cron_backup_user }}"
|
||||
job: ". /etc/duplicity/duplicity.cnf && duplicity --encrypt-key {{ duplicity_gpg_key }} --archive-dir={{ duplicity_archive_dir }} --full-if-older-than {{ duplicity_full_older_than }}D / \"{{ duplicity_azure_path }}\" --exclude-filelist {{ duplicity_exclude_filelist }}"
|
||||
when:
|
||||
- duplicity_gpg_key is defined
|
||||
- duplicity_backend == azure
|
||||
tags: ['backup_duplicity']
|
||||
|
||||
- name: duplicity | create cleanup cronjob
|
||||
cron:
|
||||
name: duplicity cleanup
|
||||
minute: "{{ duplicity_cron_backup_minute+30 }}"
|
||||
hour: "{{ duplicity_cron_backup_hour+3 }}"
|
||||
day: "{{ duplicity_cron_backup_day }}"
|
||||
month: "{{ duplicity_cron_backup_month }}"
|
||||
weekday: "{{ duplicity_cron_backup_weekday }}"
|
||||
user: "{{ duplicity_cron_backup_user }}"
|
||||
job: ". /etc/duplicity/duplicity.cnf && duplicity --encrypt-key {{ duplicity_gpg_key }} --force remove-older-than {{ duplicity_remove_older_than }}D \"{{ duplicity_azure_path }}\""
|
||||
when:
|
||||
- duplicity_gpg_key is defined
|
||||
- duplicity_backend == azure
|
||||
tags: ['backup_duplicity']
|
||||
|
Loading…
x
Reference in New Issue
Block a user