Add env vars and fix repo

This commit is contained in:
Antonio J. Delgado 2023-08-02 19:02:15 +03:00
parent 8f70be18be
commit 1c3c2ba748
4 changed files with 15 additions and 2 deletions

View file

@ -2,6 +2,7 @@
http_port: 8096
hostname: jellyfin.example.org
configure_apache: true
environmental_variables: {}
vhosts:
- vhostname: "{{ hostname }}"
weight: 25

View file

@ -0,0 +1,2 @@
install_date: "s\xE1b 08 jul 2023 21:08:49"
version: ''

View file

@ -12,6 +12,16 @@
name: apache_ssl_vhosts
when: configure_apache
- name: Set environmental variables for Jellyfin service
lineinfile:
path: /etc/default/jellyfin
regexp: "^{{ item.key }}="
line: "{{ item.key }}={{ item.value }}"
backup: yes
mode: 0644
loop: "{{ environmental_variables | dict2items }}"
notify: Restart Jellyfin
- name: Ensure Jellyfin service is configured
service:
name: jellyfin

View file

@ -17,7 +17,7 @@
- name: Ensure repository is configured
apt_repository:
repo: "deb [arch={{ ansible_facts['architecture'] }}] https://repo.jellyfin.org/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release'] }} main"
repo: "deb https://repo.jellyfin.org/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release'] }} main"
state: present
#echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/$( awk -F'=' '/^ID=/{ print $NF }' /etc/os-release ) $( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release ) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list