diff --git a/group_vars/all.yml b/group_vars/all.yml index 8fe368ba..2cfeb12a 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -50,7 +50,6 @@ mymediaforalexa_enabled: false miniflux_enabled: false # System Management -heimdall_enabled: false organizr_enabled: false portainer_enabled: false glances_enabled: false @@ -340,14 +339,7 @@ traefik_docker_image: traefik:v1.7 traefik_data_directory: "{{ docker_home }}/traefik" traefik_debug: "false" -### -### Heimdall -### -heimdall_available_externally: "false" -heimdall_docker_image: linuxserver/heimdall:latest -heimdall_data_directory: "{{ docker_home }}/heimdall" -heimdall_port_http: "10080" -heimdall_port_https: "10443" + ### ### Organizr diff --git a/roles/heimdall/defaults/main.yml b/roles/heimdall/defaults/main.yml index 4073b06d..f5292680 100644 --- a/roles/heimdall/defaults/main.yml +++ b/roles/heimdall/defaults/main.yml @@ -1,5 +1,15 @@ --- heimdall_enabled: true +heimdall_available_externally: "false" -jellyfin_user_id: "0" -jellyfin_group_id: "0" \ No newline at end of file +# directories +heimdall_docker_image: linuxserver/heimdall:latest +heimdall_data_directory: "{{ docker_home }}/heimdall" + +# network +heimdall_port_http: "10080" +heimdall_port_https: "10443" + +# uid / gid +heimdall_user_id: "1310" +heimdall_group_id: "1310" \ No newline at end of file diff --git a/roles/heimdall/tasks/heimdall.yml b/roles/heimdall/tasks/main.yml similarity index 60% rename from roles/heimdall/tasks/heimdall.yml rename to roles/heimdall/tasks/main.yml index 9788d2a8..b5b0ce54 100644 --- a/roles/heimdall/tasks/heimdall.yml +++ b/roles/heimdall/tasks/main.yml @@ -1,8 +1,26 @@ --- +- name: Create Heimdall group + group: + name: heimdall + gid: "{{ heimdall_group_id }}" + state: present + +- name: Create Heimdall user + user: + name: heimdall + uid: "{{ heimdall_user_id }}" + state: present + system: yes + update_password: on_create + create_home: no + group: heimdall + - name: Create Heimdall Directories file: path: "{{ item }}" state: directory + owner: heimdall + group: heimdall with_items: - "{{ heimdall_data_directory }}" @@ -14,8 +32,8 @@ volumes: - "{{ heimdall_data_directory }}:/config:rw" env: - PUID: "{{ jellyfin_user_id }}" - PGID: "{{ jellyfin_group_id }}" + PUID: "{{ heimdall_user_id }}" + PGID: "{{ heimdall_group_id }}" TZ: "{{ ansible_nas_timezone }}" ports: - "{{ heimdall_port_http }}:80"