Skip to content
Snippets Groups Projects
Commit 97a98fe2 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Replace uwsgi-php by php-fpm for zabbix-frontend

parent f6272a8b
No related branches found
No related tags found
No related merge requests found
d /run/uwsgi 0755 root root - -
d /run/uwsgi/app 0755 root root - -
d /run/uwsgi/app/zabbix 0775 zabbix zabbix - -
---
- name: restart zabbix frontend
service: name=zabbix-frontend state=restarted
systemd: name=php7.0-fpm.service state=restarted
- name: create tmpfiles
command: systemd-tmpfiles --create
......
......@@ -2,5 +2,5 @@
dependencies:
- role: zabbix-repo
- role: webserver
- role: uwsgi-php
- { role: php-fpm, fpm_pool: zabbix, fpm_user: zabbix, fpm_group: zabbix, fpm_socket_user: zabbix, fpm_socket_group: www-data, fpm_params: { date.timezone: "Europe/Berlin", post_max_size: "16M", max_execution_time: 300, max_input_time: 300, always_populate_raw_post_data: -1 } }
# TODO webserver fails ansible on initial deployment currently by purpose
---
- name: ensure there is an uwsgi temporary directory
copy: src=10-uwsgi.conf dest=/etc/tmpfiles.d/10-uwsgi.conf
notify:
- create tmpfiles
tags:
- config
- zabbix
- name: ensure there is an frontend app temporary directory
copy: src=10-zabbix.conf dest=/etc/tmpfiles.d/10-zabbix.conf
notify:
- create tmpfiles
tags:
- config
- zabbix
- name: ensure the systemd service file is available
copy: src=zabbix-frontend.service dest=/etc/systemd/system/zabbix-frontend.service
notify:
- reload systemd service files
- restart zabbix frontend
tags:
- service
- zabbix
- name: ensure the frontend package is installed
apt: name=zabbix-frontend-php state=latest
notify:
......@@ -41,14 +16,6 @@
- packages
- zabbix
- name: ensure the frontend app got some uwsgi config
copy: src=zabbix.ini dest=/etc/uwsgi/apps-available/zabbix.ini
notify:
- restart zabbix frontend
tags:
- config
- zabbix
- name: ensure a user executing the app exists
user: name=zabbix system=yes home=/usr/share/zabbix shell=/usr/sbin/nologin createhome=no group=zabbix state=present
notify:
......@@ -57,36 +24,6 @@
- user
- zabbix
- name: ensure an nginx config file is available
copy: src=zabbix.conf dest=/etc/nginx/sites-available/zabbix.conf
when: zabbix_configure_webserver
notify:
- restart nginx
tags:
- config
- zabbix
- nginx
- name: ensure the frontend is enabled in nginx
lineinfile: dest=/etc/nginx/sites-available/main line="include /etc/nginx/sites-available/zabbix.conf;" insertbefore="}"
when: zabbix_configure_webserver
notify:
- restart nginx
tags:
- config
- zabbix
- nginx
- name: ensure the frontend configuration file is installed
template: src=zabbix.conf.php.j2 dest=/etc/zabbix/web/zabbix.conf.php
when: zabbix_configure_webserver
notify:
- restart zabbix frontend
tags:
- config
- zabbix
- nginx
- name: ensure the database server listens on the external interface
replace: dest=/etc/postgresql/9.6/main/postgresql.conf regexp="#listen_addresses = 'localhost'" replace="listen_addresses = '*'"
notify:
......@@ -106,11 +43,3 @@
- zabbix
- meta: flush_handlers
- name: ensure the frontend is enabled and running
service: name=zabbix-frontend state=running enabled=yes
tags:
- service
- zabbix
- meta: flush_handlers
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment