From 07dd4014d7104e04c21c739cadefa1589a860661 Mon Sep 17 00:00:00 2001 From: Erik Berg Date: Sun, 9 Jun 2024 17:56:37 +0200 Subject: [PATCH] Move installation of debian php-pgsql There is a corresponding php-mysql package, and we might aswell make sure that is installed based on zabbix_server_database. --- roles/zabbix_web/tasks/Debian.yml | 18 ------------------ roles/zabbix_web/tasks/apache.yml | 2 ++ roles/zabbix_web/vars/Debian.yml | 4 +++- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/roles/zabbix_web/tasks/Debian.yml b/roles/zabbix_web/tasks/Debian.yml index 671938dc9..336171309 100644 --- a/roles/zabbix_web/tasks/Debian.yml +++ b/roles/zabbix_web/tasks/Debian.yml @@ -4,21 +4,3 @@ zabbix_underscore_version: "{{ zabbix_web_version | regex_replace('\\.', '_') }}" tags: - always - -- name: "Debian | Install PgSQL Dependencies" - ansible.builtin.apt: - pkg: "php{{ zabbix_web_php_installed_version }}-pgsql" - state: "present" - update_cache: true - cache_valid_time: 0 - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: zabbix_web_php_dependencies_install - until: zabbix_web_php_dependencies_install is succeeded - become: true - when: zabbix_server_database == 'pgsql' - tags: - - install - - dependencies - - database diff --git a/roles/zabbix_web/tasks/apache.yml b/roles/zabbix_web/tasks/apache.yml index d746512c2..19d304595 100644 --- a/roles/zabbix_web/tasks/apache.yml +++ b/roles/zabbix_web/tasks/apache.yml @@ -21,6 +21,8 @@ become: true tags: - install + - dependencies + - database - name: "Apache | Get Apache version" ansible.builtin.shell: | diff --git a/roles/zabbix_web/vars/Debian.yml b/roles/zabbix_web/vars/Debian.yml index 04a6e5cf0..170e97298 100644 --- a/roles/zabbix_web/vars/Debian.yml +++ b/roles/zabbix_web/vars/Debian.yml @@ -48,6 +48,8 @@ _zabbix_web_apache_packages: - zabbix-apache-conf _zabbix_web_apache_php_dependencies: - "libapache2-mod-php{{ zabbix_web_php_installed_version }}" + - "php{{ zabbix_web_php_installed_version }}-{{ zabbix_server_database }}" _zabbix_web_nginx_package: - zabbix-nginx-conf -_zabbix_web_nginx_php_dependencies: [] +_zabbix_web_nginx_php_dependencies: + - "php{{ zabbix_web_php_installed_version }}-{{ zabbix_server_database }}"