Skip to content

Commit

Permalink
chore: deploy media stack and refactor playbooks
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrarimarco committed Jan 19, 2025
1 parent b8c0b86 commit 931761b
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/test-ansible.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,12 @@ jobs:
strategy:
matrix:
test_container_image_id:
- "geerlingguy/docker-debian11-ansible:latest"
- "geerlingguy/docker-debian12-ansible:latest"
test_playbook_name:
- boot-bare-metal
- bootstrap
- container-engine
- coral
- home-lab-node
- proxmox-node
- setup-disks
- main
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ configure_backup_restic: true
configure_docker: true
configure_frigate: true
configure_home_assistant: true
configure_media_stack: true
configure_monitoring_sata: false
has_coral_pci_accelerator: true
has_intel_igpu: true
Expand Down Expand Up @@ -39,3 +40,5 @@ partitions_to_create:
partition_number: 1
- device: "{{ data_disk_device }}"
partition_number: 1

start_media_stack: false
6 changes: 0 additions & 6 deletions config/ansible/playbooks/home-lab-node.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
---
- name: Import the container engine playbook
ansible.builtin.import_playbook: container-engine.yaml

- name: Import the disk setup playbook
ansible.builtin.import_playbook: setup-disks.yaml

- name: Configure Home Lab nodes
hosts: all
gather_facts: true
Expand Down
6 changes: 6 additions & 0 deletions config/ansible/playbooks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@
- name: Import the proxmox node playbook
ansible.builtin.import_playbook: proxmox-node.yaml

- name: Import the disk setup playbook
ansible.builtin.import_playbook: setup-disks.yaml

- name: Import the coral playbook
ansible.builtin.import_playbook: coral.yaml

- name: Import the home lab node playbook
ansible.builtin.import_playbook: home-lab-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,8 @@
- name: Register OS package setup tasks
ansible.builtin.include_tasks:
file: register-os-package-setup-facts.yaml

- name: Register Intel iGPU tasks
ansible.builtin.include_tasks:
file: register-intel-igpu-facts.yaml
when: has_intel_igpu | default(false)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- name: Get render group id
ansible.builtin.getent:
database: group
key: render

- name: Debug getent_group
ansible.builtin.debug:
var: getent_group
verbosity: 1

- name: Register facts for Intel iGPU
ansible.builtin.set_fact:
# Format: {"render": ['x', '104', '']}
intel_igpu_render_group_id: "{{ getent_group['render'][1] }}"

- name: Debug intel_igpu_render_group_id
ansible.builtin.debug:
var: intel_igpu_render_group_id
verbosity: 1
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ services:
jellyfin:
image: {{ container_images_ids["jellyfin"] }}
container_name: jellyfin
devices:
{% if has_intel_igpu | default(false) %}
- /dev/dri/renderD128:/dev/dri/renderD128
{% endif %}
group_add:
{% if has_intel_igpu | default(false) %}
- {{ intel_igpu_render_group_id }}
{% endif %}
volumes:
- {{ jellyfin_configuration_directory_path }}:/config
- {{ jellyfin_cache_directory_path }}:/cache
Expand Down

0 comments on commit 931761b

Please sign in to comment.