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

Commit

Permalink
Minor fixes for installation and custom user handling (#23)
Browse files Browse the repository at this point in the history
First change introduces `restic_version` for handling file name in `/tmp/`. This will allow upgrades and downgrades of `restic` client in environments that are not constantly restarting/reloading/cleaning up (Ansible Tower in our case).

Second change enforces `restic_user` variable on the installed `restic` client. I think this actually wouldn't work should you specify any different user in the variable as there's '0750' mode on the file, which would lack the executable bit for the group (that was set properly via `restic_group`).
  • Loading branch information
hadret authored and paulfantom committed Jun 1, 2018
1 parent d400c0c commit 949d64f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@

- name: Decompress the binary
become: false
shell: "bzip2 -dc /tmp/restic_{{ restic_version }}_{{ ansible_system | lower }}_{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}.bz2 > /tmp/restic"
shell: "bzip2 -dc /tmp/restic_{{ restic_version }}_{{ ansible_system | lower }}_{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}.bz2 > /tmp/restic_{{ restic_version }}"
args:
creates: "/tmp/restic"
creates: "/tmp/restic_{{ restic_version }}"
delegate_to: localhost
run_once: true
check_mode: false

- name: Propagate restic binary
copy:
src: /tmp/restic
src: "/tmp/restic_{{ restic_version }}"
dest: '{{ restic_install_path }}/restic'
mode: '0750'
owner: 'root'
Expand Down

0 comments on commit 949d64f

Please sign in to comment.