fix: script rewrite & shell command
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
- name: Uncompress restic
|
- name: Uncompress restic
|
||||||
ansible.builtin.command:
|
ansible.builtin.shell:
|
||||||
cmd: "bzip2 -dc /tmp/restic_{{ restic_version }}_{{ restic_system }}_{{ restic_architecture }}.bz2 > {{ restic_path }}"
|
cmd: "bzip2 -dc /tmp/restic_{{ restic_version }}_{{ restic_system }}_{{ restic_architecture }}.bz2 > {{ restic_path }}"
|
||||||
changed_when: true
|
changed_when: true
|
||||||
|
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
## Variable
|
## Variable
|
||||||
RESTIC_PASSWORD="{{ restic_pass }}"
|
export RESTIC_PASSWORD="{{ restic_pass }}"
|
||||||
RESTIC_REPOSITORY="{{ restic_repository }}"
|
export RESTIC_REPOSITORY="{{ restic_repository }}"
|
||||||
AWS_ACCESS_KEY_ID="{{ restic_aws_access_key_id }}"
|
export AWS_ACCESS_KEY_ID="{{ restic_aws_access_key_id }}"
|
||||||
AWS_SECRET_ACCESS_KEY="{{ restic_aws_secret_access_key }}"
|
export AWS_SECRET_ACCESS_KEY="{{ restic_aws_secret_access_key }}"
|
||||||
|
|
||||||
## lancement de la sauvegarde
|
## lancement de la sauvegarde
|
||||||
{{ restic_path }} backup --exclude-caches {% for i in restic_backup_excluded_path %} -e {{ i }} {% endfor %} {% for i in restic_backup_path %}{{ i }} {% endfor %}
|
{{ restic_path }} backup --exclude-caches {% for i in restic_backup_excluded_path %} -e {{ i }} {% endfor %} {% for i in restic_backup_path %}{{ i }} {% endfor %}
|
||||||
|
Reference in New Issue
Block a user