19 lines
612 B
YAML
19 lines
612 B
YAML
- name: Make sure the base-directory exists
|
|
file: path={{ base }} state=directory owner=backup group=backup mode=0755
|
|
|
|
- name: Check for borg-installation
|
|
stat: path={{ base }}/{{ executable }}
|
|
register: borg
|
|
|
|
- name: Download borg
|
|
get_url: url={{ url }} dest={{ execpath }}
|
|
when: borg.stat.exists == False
|
|
|
|
- name: Change permissions and owner
|
|
file: state=file path="{{ execpath }}" owner=backup group=backup mode=0700
|
|
when: borg.stat.exists == False
|
|
|
|
- name: Symlink to /usr/local/bin
|
|
file: force=yes state=link src="{{ execpath }}" dest="/usr/local/bin/borg"
|
|
when: borg.stat.exists == False
|