zoneminder: ansible-lint fixes
This commit is contained in:
parent
c566ddd819
commit
8ffc56a625
2 changed files with 23 additions and 23 deletions
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- name: restart zoneminder
|
||||
service:
|
||||
- name: Restart zoneminder
|
||||
ansible.builtin.service:
|
||||
name: zoneminder
|
||||
state: restarted
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
- name: fix selinux contexts from cache directory
|
||||
- name: Fix SELinux contexts from cache directory
|
||||
community.general.sefcontext:
|
||||
path: "/var/cache/zoneminder(/.*)?"
|
||||
setype: httpd_cache_t
|
||||
|
||||
- name: install packages
|
||||
- name: Install packages
|
||||
ansible.builtin.package:
|
||||
name: "{{ item }}"
|
||||
state: installed
|
||||
|
@ -12,12 +12,12 @@
|
|||
- mariadb
|
||||
- zoneminder-httpd
|
||||
|
||||
- name: fix selinux contexts from data directory
|
||||
- name: Fix SELinux contexts from data directory
|
||||
community.general.sefcontext:
|
||||
path: "/export/zoneminder(/.*)?"
|
||||
setype: zoneminder_var_lib_t
|
||||
|
||||
- name: create data directory
|
||||
- name: Create data directory
|
||||
ansible.builtin.file:
|
||||
path: /export/zoneminder
|
||||
state: directory
|
||||
|
@ -26,7 +26,7 @@
|
|||
group: apache
|
||||
setype: _default
|
||||
|
||||
- name: link data directory
|
||||
- name: Link data directory
|
||||
ansible.builtin.file:
|
||||
dest: /srv/zoneminder
|
||||
src: /export/zoneminder
|
||||
|
@ -35,34 +35,34 @@
|
|||
group: "{{ ansible_wheel }}"
|
||||
follow: false
|
||||
|
||||
- name: create config
|
||||
- name: Create config
|
||||
ansible.builtin.template:
|
||||
dest: /etc/zm/conf.d/local.conf
|
||||
src: zm.conf
|
||||
mode: 0640
|
||||
owner: root
|
||||
group: apache
|
||||
notify: restart zoneminder
|
||||
notify: Restart zoneminder
|
||||
|
||||
- name: remove mariadb depency from unit file
|
||||
- name: Remove mariadb depency from unit file
|
||||
ansible.builtin.shell:
|
||||
cmd: >-
|
||||
sed -e 's/mariadb\.service//' /lib/systemd/system/zoneminder.service
|
||||
> /etc/systemd/system/zoneminder.service
|
||||
creates: /etc/systemd/system/zoneminder.service
|
||||
warn: false
|
||||
notify: restart zoneminder
|
||||
notify: Restart zoneminder
|
||||
when: zm_mysql_host != "localhost"
|
||||
|
||||
- name: allow zoneminder to read host private key
|
||||
- name: Allow zoneminder to read host private key
|
||||
ansible.builtin.user:
|
||||
name: apache
|
||||
groups: hostkey
|
||||
append: true
|
||||
notify: restart zoneminder
|
||||
notify: Restart zoneminder
|
||||
when: zm_mysql_host != "localhost"
|
||||
|
||||
- name: loosen selinux settings
|
||||
- name: Loosen SELinux settings
|
||||
ansible.posix.seboolean:
|
||||
name: "{{ item }}"
|
||||
state: true
|
||||
|
@ -72,7 +72,7 @@
|
|||
- nis_enabled
|
||||
|
||||
# selinux doesn't allow create this
|
||||
- name: create stub web log
|
||||
- name: Create stub web log
|
||||
ansible.builtin.file:
|
||||
dest: /var/log/zoneminder/web_php.log
|
||||
state: touch
|
||||
|
@ -82,35 +82,35 @@
|
|||
access_time: preserve
|
||||
modification_time: preserve
|
||||
|
||||
- name: link apache config
|
||||
- name: Link apache config
|
||||
ansible.builtin.file:
|
||||
dest: /etc/httpd/conf.local.d/zm.conf
|
||||
src: /etc/zm/www/zoneminder.httpd.conf
|
||||
state: link
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: restart apache
|
||||
notify: Restart apache
|
||||
|
||||
- name: link apache php config
|
||||
- name: Link apache php config
|
||||
ansible.builtin.file:
|
||||
dest: /etc/httpd/conf.local.d/php.conf
|
||||
src: /etc/httpd/conf.d/php.conf
|
||||
state: link
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: restart apache
|
||||
notify: Restart apache
|
||||
|
||||
- name: configure zoneminder timezone
|
||||
- name: Configure zoneminder timezone
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/php.d/timezone.ini
|
||||
content: "date.timezone=UTC\n"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: restart apache
|
||||
notify: Restart apache
|
||||
|
||||
# required for database updates to work
|
||||
- name: configure mysql client to use ssl
|
||||
- name: Configure mysql client to use ssl
|
||||
ansible.builtin.copy:
|
||||
dest: /root/.my.cnf
|
||||
content: |
|
||||
|
@ -122,7 +122,7 @@
|
|||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: enable service
|
||||
- name: Enable service
|
||||
ansible.builtin.service:
|
||||
name: zoneminder
|
||||
state: started
|
||||
|
|
Loading…
Add table
Reference in a new issue