add selinux settings for custom logfile location
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Robert Kaussow 2019-11-22 11:39:47 +01:00
parent 8741967e64
commit 52938efac3
3 changed files with 23 additions and 0 deletions

View File

@ -30,6 +30,12 @@ jellyfin_packages_extra: []
jellyfin_log_level_console: Fatal
jellyfin_log_level_file: Information
jellyfin_selinux_fcontext:
- target: "{{ jellyfin_log_dir }}(/.*)?"
setype: var_log_t
jellyfin_selinux_restorecon:
- "-ir {{ jellyfin_log_dir }}"
# @var jellyfin_http_bind_port:description: >
# DONT change it! Changing the bind ports is currently not supported.
# @end

View File

@ -1,4 +1,6 @@
---
- include_tasks: prepare.yml
- include_tasks: install.yml
- include_tasks: selinux.yml
when: ansible_selinux.status == "enabled"
- include_tasks: post_tasks.yml

15
tasks/selinux.yml Normal file
View File

@ -0,0 +1,15 @@
---
- block:
- name: Add SELinux file context mapping definitions
sefcontext:
target: "{{ item.target }}"
setype: "{{ item.setype }}"
state: present
loop: "{{ jellyfin_selinux_fcontext }}"
- name: Apply new SELinux file context to filesystem
command: "restorecon {{ item }}"
loop: "{{ jellyfin_selinux_restorecon }}"
changed_when: False
become: True
become_user: root