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
+1 -1
View File
@@ -71,7 +71,7 @@
remote_user: nerevar remote_user: nerevar
tasks: tasks:
- import_tasks: tasks/tmux.yml - import_tasks: tasks/tmux.yml
- name: vcmp timer - name: Talos install
hosts: talos hosts: talos
become: true become: true
remote_user: nerevar remote_user: nerevar
+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
+11
View File
@@ -0,0 +1,11 @@
[Unit]
Description=Stash AV Media Server
After=network.target local-fs.target
[Service]
Type=simple
ExecStart=/usr/local/bin/stash --nobrowser --config /var/lib/stash/config.yml
User=stash
[Install]
WantedBy=default.target