zoneminder: Move data directory under /export

This commit is contained in:
Timo Makinen 2021-04-05 15:19:55 +00:00
parent 19aa1cce34
commit 3ca1e7fce8
2 changed files with 25 additions and 0 deletions

View file

@ -9,6 +9,29 @@
name: zoneminder-httpd
state: installed
- name: fix selinux contexts from data directory
sefcontext:
path: "/export/zoneminder(/.*)?"
setype: zoneminder_var_lib_t
- name: create data directory
file:
path: /export/zoneminder
state: directory
mode: 0750
owner: apache
group: apache
setype: _default
- name: link data directory
file:
dest: /srv/zoneminder
src: /export/zoneminder
state: link
owner: root
group: "{{ ansible_wheel }}"
follow: false
- name: create config
template:
dest: /etc/zm/conf.d/local.conf

View file

@ -1,5 +1,7 @@
# {{ ansible_managed }}
ZM_DIR_EVENTS=/srv/zoneminder
ZM_DB_HOST=localhost
ZM_DB_NAME=zm
ZM_DB_USER=zmuser