Updates for yggdrasil

This commit is contained in:
2025-04-15 13:58:49 -05:00
parent a82bd54091
commit 7962727fb3
10 changed files with 77 additions and 99 deletions

View File

@@ -1,39 +1,52 @@
---
- name: Yggdrasil packages
become: yes
package:
name:
- emby-server
- perl-image-exiftool
- ffmpeg
- name: Yggdrasil packages
become: true
ansible.builtin.package:
name:
- emby-server
- ffmpeg
- yggdrasil-scripts # Sub dependencies included in the PKGBUILD
- name: Yggdrasil directories
become: yes
file:
path: "{{ item }}"
state: directory
owner: http
group: http
mode: 2750
loop:
- /home/yggdrasil
- /home/yggdrasil/Digital_Library
- /home/yggdrasil/Music
- /home/yggdrasil/Videos
- /home/yggdrasil/Videos/Shows
- /home/yggdrasil/Videos/Movies
- /home/yggdrasil/Software
- name: Ensure group
ansible.builtin.group:
name: yggdrasil
state: present
- name: LiveTV channels
command: /bin/bash -c "curl -s https://raw.githubusercontent.com/iptv-org/iptv/master/streams/us.m3u | grep -A 1 -E '{{ iptv_location }}' 2>&1 | grep -vE '^--$'"
register: livetv_channels
- name: Ensure emby user is in group
ansible.builtin.user:
name: emby
append: true
groups: yggdrasil
- name: Write to file
become: yes
copy:
content: "{{ livetv_channels.stdout }}"
dest: /var/lib/emby/local-channels.m3u
owner: emby
group: http
mode: 0640
- name: Yggdrasil directories
become: true
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: emby
group: yggdrasil
mode: "2550"
loop:
- /home/yggdrasil
- /home/yggdrasil/Digital_Library
- /home/yggdrasil/Music
- /home/yggdrasil/Videos
- /home/yggdrasil/Videos/Shows
- /home/yggdrasil/Videos/Movies
- /home/yggdrasil/Software
- name: LiveTV channels
# noqa: no-changed-when
ansible.builtin.command:
cmd: bash -c "curl -s https://raw.githubusercontent.com/iptv-org/iptv/master/streams/us.m3u | grep -A1 -E '{{ iptv_location }}' 2>&1 | grep -vE '^--$' || true"
register: livetv_channels
- name: Write to file
become: true
ansible.builtin.copy:
content: "{{ livetv_channels.stdout }}"
dest: /var/lib/emby/local-channels.m3u
owner: emby
group: yggdrasil
mode: "0640"