adds stash task

not added in playbook for now.
This commit is contained in:
2025-01-27 09:33:59 +01:00
parent 7f75e05e20
commit c08b8481f7
3 changed files with 64 additions and 1 deletions
+52
View File
@@ -0,0 +1,52 @@
- 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