Skip to content

Commit

Permalink
Merge pull request #116 from beechesII/main
Browse files Browse the repository at this point in the history
added new variable restic_backup_script_shell
  • Loading branch information
DO1JLR authored Feb 8, 2024
2 parents 64ce64c + 1412676 commit 99381ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ ansible-galaxy install roles-ansible.restic
| `restic_download_path` | `'/opt/restic'` | Download location for the restic binary |
| `restic_install_path` | `'/usr/local/bin'` | Install location for the restic binary |
| `restic_script_dir` | `'/opt/restic'` | Location of the generated backup scripts |
| `restic_backup_script_shell` | `sh` | Shell to use for run of backup script |
| `restic_log_dir` | `'{{ restic_script_dir }}/log'` | Location of the logs of the backup scripts |
| `restic_repos` | `{}` | A dictionary of repositories where snapshots are stored. *(More Info: [Repos](#Repos))* |
| `restic_backups` | `{}` (or `[]`) | A list of dictionaries specifying the files and directories to be backed up *(More Infos: [Backups](#Backups))* |
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ restic_version: '0.16.3'
restic_download_path: '/opt/restic'
restic_install_path: '/usr/local/bin'
restic_script_dir: '/opt/restic'
restic_backup_script_shell: sh
restic_log_dir: '{{ restic_script_dir }}/log'
restic_repos: {}
restic_backups: []
Expand Down
2 changes: 1 addition & 1 deletion tasks/run_backup.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: (RUN BACKUP) Run backup script
ansible.builtin.command:
cmd: "/usr/bin/env sh {{ restic_script_dir }}/backup-{{ item.name | replace(' ', '') }}.sh"
cmd: "/usr/bin/env {{ restic_backup_script_shell }} {{ restic_script_dir }}/backup-{{ item.name | replace(' ', '') }}.sh"
no_log: "{{ restic_no_log }}"
with_items: '{{ restic_backups }}'
when:
Expand Down

0 comments on commit 99381ad

Please sign in to comment.