Skip to content
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.

Commit

Permalink
Add restic_mode variable
Browse files Browse the repository at this point in the history
It should be possible to allow all users to run the restic binary.
For that the variable restic_mode should be set to 0755 to set the
permissions of the file accordingly.
  • Loading branch information
jkirk committed Dec 20, 2018
1 parent 22d3981 commit 8fc1da0
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 @@ -27,6 +27,7 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
| `restic_group` | "root" | system group to run restic |
| `restic_shell` | "/bin/false" | the shell for the restic user, change this if you want to be able to su to it |
| `restic_install_path` | "/usr/local/bin" | directory where restic binary will be installed |
| `restic_mode` | 0750 | permissions of the restic binary, change to 0755 if you want to allow all users to run restic |
| `restic_cron_mailto` | restic_user | who to mail results of the restic crons to, set to "" to not mail |
| `restic_cron_stdout_file` | null | what file to log restic output to, null means include in mailto, use /dev/null to discard |
| `restic_cron_stderr_file` | null | what file to log restic errors to, null means include in mailto, use /dev/null to discard |
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ restic_user: root
restic_group: "{{ restic_user }}"
restic_shell: "/bin/false"
restic_home: "/var/lib/restic"
restic_mode: 0750

restic_install_path: '/usr/local/bin'

Expand Down
2 changes: 1 addition & 1 deletion tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
copy:
src: "/tmp/restic_{{ restic_version }}_{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}"
dest: '{{ restic_install_path }}/restic'
mode: '0750'
mode: '{{ restic_mode }}'
owner: 'root'
group: '{{ restic_group }}'

Expand Down

0 comments on commit 8fc1da0

Please sign in to comment.