39 lines
977 B
YAML
39 lines
977 B
YAML
---
|
|
- name: install piwik package
|
|
dnf: state=present name={{ item }}
|
|
with_items:
|
|
- piwik
|
|
- mod_ssl
|
|
tags:
|
|
- packages
|
|
- piwik
|
|
|
|
- name: set up http configs for piwik
|
|
template: src={{ item }} dest=/etc/httpd/conf.d/{{ item }}
|
|
owner=root group=root mode=0644
|
|
with_items:
|
|
- piwik-httpd.conf
|
|
tags:
|
|
- files
|
|
- config
|
|
- piwik
|
|
notify:
|
|
- restart apache
|
|
|
|
- name: Install the SSL cert so that we can use https
|
|
copy: >
|
|
src={{ private }}/files/httpd/{{ item }} dest=/etc/pki/tls/certs/{{ item }}
|
|
owner=root group=root mode=0600
|
|
with_items:
|
|
- piwik.fedorainfracloud.org.cert
|
|
- piwik.fedorainfracloud.org.key
|
|
- piwik.fedorainfracloud.org.intermediate.cert
|
|
tags:
|
|
- config
|
|
- piwik
|
|
|
|
- name: Create directory for db backup
|
|
file: path=/srv/dbdump state=directory
|
|
|
|
- name: database dump cron
|
|
cron: name=dbdump special_time=daily job="mysqldump --skip-extended-insert --single-transaction piwik | gzip > /srv/dbdump/piwik.sql.gz"
|