Commit df8a265b authored by Lars Beckers's avatar Lars Beckers
Browse files

update server deployment to buster

parent f3cb570f
Pipeline #1880 passed with stage
in 40 seconds
---
- name: restart zabbix frontend
systemd: name=php7.0-fpm.service state=restarted
systemd: name=php-fpm@zabbix.service state=restarted
- name: create tmpfiles
command: systemd-tmpfiles --create
......
......@@ -9,9 +9,9 @@
tags:
- zabbix
- name: ensure php5-pgsql is available
- name: ensure php-pgsql is available
apt:
name: php5-pgsql
name: php-pgsql
state: present
notify:
- restart zabbix frontend
......@@ -34,7 +34,7 @@
- name: ensure the database server listens on the external interface
replace:
dest: /etc/postgresql/9.6/main/postgresql.conf
dest: /etc/postgresql/11/main/postgresql.conf
regexp: "#listen_addresses = 'localhost'"
replace: "listen_addresses = '*'"
notify:
......@@ -46,7 +46,7 @@
- name: ensure the database server allows connections from the server
lineinfile:
dest: /etc/postgresql/9.6/main/pg_hba.conf
dest: /etc/postgresql/11/main/pg_hba.conf
# yamllint disable-line rule:line-length
insertafter: "host all all 127.0.0.1/32 md5"
# yamllint disable-line rule:line-length
......
......@@ -13,7 +13,7 @@
- repos
- zabbix
- name: ensure apt doest not know about old zabbix repos
- name: ensure apt does not know about old zabbix repos
apt_repository:
repo: "{{ item }}"
state: absent
......@@ -68,33 +68,34 @@
- zabbix
- chr
- name: query installed packages
# yamllint disable-line rule:empty-values
package_facts:
register: installed_packages
tags:
- repos
- zabbix
- name: check for new packages
block:
- name: upload the version check script
copy:
src: check-update.py
dest: "/usr/local/sbin/check-update.py"
owner: root
group: root
mode: '0755'
- name: ensure the version check script is executed regularly
template:
src: crontab.j2
dest: /etc/cron.d/check-zabbix-version
owner: root
group: root
mode: '0644'
when: '"zabbix-server-pgsql" in installed_packages.ansible_facts.packages'
tags:
- repos
- zabbix
# packages facts are somewhat broken, but we're using debian's repos anyway now
# - name: query installed packages
# # yamllint disable-line rule:empty-values
# package_facts:
# register: installed_packages
# tags:
# - repos
# - zabbix
#
# - name: check for new packages
# block:
# - name: upload the version check script
# copy:
# src: check-update.py
# dest: "/usr/local/sbin/check-update.py"
# owner: root
# group: root
# mode: '0755'
# - name: ensure the version check script is executed regularly
# template:
# src: crontab.j2
# dest: /etc/cron.d/check-zabbix-version
# owner: root
# group: root
# mode: '0644'
# when: '"zabbix-server-pgsql" in installed_packages.ansible_facts.packages'
# tags:
# - repos
# - zabbix
- meta: flush_handlers
......@@ -99,7 +99,7 @@
- name: ensure the database server listens on the external interface
replace:
dest: /etc/postgresql/9.6/main/postgresql.conf
dest: /etc/postgresql/11/main/postgresql.conf
regexp: "#listen_addresses = 'localhost'"
replace: "listen_addresses = '*'"
notify:
......@@ -111,7 +111,7 @@
- name: ensure the database server allows connections from the server
lineinfile:
dest: /etc/postgresql/9.6/main/pg_hba.conf
dest: /etc/postgresql/11/main/pg_hba.conf
# yamllint disable-line rule:line-length
insertafter: "host all all 127.0.0.1/32 md5"
# yamllint disable-line rule:line-length
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment