Initial commit
This commit is contained in:
commit
b6c8119fca
3 changed files with 35 additions and 0 deletions
4
handlers/main.yml
Normal file
4
handlers/main.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
- name: restart zoneminder
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: zoneminder
|
||||||
|
state: restarted
|
||||||
28
tasks/main.yml
Normal file
28
tasks/main.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
- name: install packages
|
||||||
|
ansible.builtin.apt:
|
||||||
|
pkg:
|
||||||
|
- zoneminder
|
||||||
|
- fcgiwrap
|
||||||
|
|
||||||
|
- name: fix config premissions
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/zm/zm.conf
|
||||||
|
group: www-data
|
||||||
|
mode: "0640"
|
||||||
|
notify: restart zoneminder
|
||||||
|
|
||||||
|
- name: update config
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: 03-local.conf.j2
|
||||||
|
dest: /etc/zm/conf.d/03-local.conf
|
||||||
|
owner: root
|
||||||
|
group: www-data
|
||||||
|
mode: "0640"
|
||||||
|
notify: restart zoneminder
|
||||||
|
|
||||||
|
- name: enable zoneminder
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: zoneminder
|
||||||
|
enabled: True
|
||||||
|
|
||||||
|
# TODO: db setup (/usr/share/zoneminder/db/zm_create.sql has hard-coded db name)
|
||||||
3
templates/03-local.conf.j2
Normal file
3
templates/03-local.conf.j2
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{% for key, value in zoneminder_config.items() %}
|
||||||
|
{{ key }}={{ value }}
|
||||||
|
{% endfor %}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue