c08b8481f7
not added in playbook for now.
53 lines
1009 B
YAML
53 lines
1009 B
YAML
- name: Create temp directory
|
|
tempfile:
|
|
state: directory
|
|
suffix: bininstall
|
|
register: temp_dir
|
|
|
|
- name: Download binary
|
|
get_url:
|
|
url: "https://github.com/stashapp/stash/releases/latest/download/stash-linux"
|
|
dest: "{{ temp_dir.path }}/stash"
|
|
mode: 0755
|
|
|
|
- name: Move binary to system path
|
|
copy:
|
|
src: "{{ temp_dir.path }}/stash"
|
|
dest: "/usr/local/bin/"
|
|
mode: 0755
|
|
remote_src: yes
|
|
|
|
- name: Copy service file
|
|
copy:
|
|
src: stash/stash.service
|
|
dest: /etc/systemd/system/
|
|
mode: 0644
|
|
|
|
- name: Stash user
|
|
user:
|
|
name: stash
|
|
system: yes
|
|
create_home: no
|
|
shell: /sbin/nologin
|
|
groups: aurbis
|
|
|
|
- name: Create config dir
|
|
file:
|
|
path: /var/lib/stash
|
|
state: directory
|
|
mode: "0755"
|
|
owner: "stash"
|
|
group: "stash"
|
|
|
|
- name: Start and enable stash service
|
|
systemd:
|
|
name: stash
|
|
state: started
|
|
enabled: yes
|
|
daemon_reload: yes
|
|
|
|
- name: Clean up temp directory
|
|
file:
|
|
path: "{{ temp_dir.path }}"
|
|
state: absent
|