--- - name: fix selinux contexts from cache directory sefcontext: path: "/var/cache/zoneminder(/.*)?" setype: httpd_cache_t - name: install packages package: name: zoneminder-httpd state: installed - name: create config template: dest: /etc/zm/conf.d/local.conf src: zm.conf mode: 0640 owner: root group: apache notify: restart zoneminder # selinux doesn't allow create this - name: create stub web log file: dest: /var/log/zoneminder/web_php.log state: touch mode: 0640 owner: apache group: apache access_time: preserve modification_time: preserve - name: link apache config 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 - name: link apache php config 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 - name: configure zoneminder timezone copy: dest: /etc/php.d/timezone.ini content: "date.timezone=UTC\n" mode: 0644 owner: root group: "{{ ansible_wheel }}" notify: restart apache - name: enable service service: name: zoneminder state: started enabled: true