-
Notifications
You must be signed in to change notification settings - Fork 26
Add restic_mode variable #42
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,10 +68,15 @@ | |
copy: | ||
src: "/tmp/restic_{{ restic_version }}_{{ go_arch }}" | ||
dest: '{{ restic_install_path }}/restic' | ||
mode: '0750' | ||
mode: '{{ restic_mode }}' | ||
owner: 'root' | ||
group: '{{ restic_group }}' | ||
|
||
- name: Read status of restic binary | ||
stat: | ||
path: '{{ restic_install_path }}/restic' | ||
register: restic_binary | ||
|
||
- name: Install libcap on Debian systems | ||
apt: | ||
name: "libcap2-bin" | ||
|
@@ -80,6 +85,7 @@ | |
when: | ||
- ansible_os_family | lower == "debian" | ||
- restic_user != 'root' | ||
- restic_group != 'root' | ||
|
||
- name: Set proper capabilities for restic binary | ||
capabilities: | ||
|
@@ -88,4 +94,6 @@ | |
state: present | ||
when: | ||
- restic_user != 'root' | ||
- restic_group != 'root' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
- not ansible_check_mode | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @TheLastProject This does not come from my PR, but still: what is this line for? The tasks are always run when not ansible_check_mode, no? Did I make a mistake in my thinking? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. .. and skipped when in Check/Test-Mode. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's just to not fail if the capabilities are not set |
||
- not restic_binary.stat.xoth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TheLastProject I think this line is wrong too, right?
libcap2-bin
should be installed if restic_user OR restic_group are not 'root', like this:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is @paulfantom's code, but it seems to me that that indeed should be changed.