zabbix: modify db tasks zabbix_server role

error handling
Update iptables to allow access to server/agent

Signed-off-by: David Kirwan <dkirwan@redhat.com>
This commit is contained in:
David Kirwan 2023-06-19 09:00:23 +01:00
parent a5e52a113e
commit a9a14a4023
5 changed files with 8 additions and 2 deletions

View file

@ -31,6 +31,10 @@
-A INPUT -p tcp -m tcp --dport 5666 -s 38.145.60.16 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5666 -s 38.145.60.15 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5666 -s 10.3.163.10 -j ACCEPT
# zabbix01.stg
-A INPUT -p tcp -m tcp --dport 10051 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 10050 -s 10.3.166.61 -j ACCEPT
# if the host declares a fedmsg-enabled wsgi app, open ports for it
{% if wsgi_fedmsg_service is defined %}

View file

@ -17,4 +17,5 @@ zabbix_server_pkgs:
- zabbix-agent
- postgresql-server
- python3-psycopg2
- nmap

View file

@ -4,6 +4,7 @@
ansible.builtin.shell: postgresql-setup initdb
args:
executable: /bin/bash
ignore_errors: True
tags:
- db-configure
@ -28,7 +29,6 @@
- name: Configure the zabbix db
ansible.builtin.shell: "sudo -u postgres createdb -O {{ zabbix_db_user }} {{ zabbix_db_name }}"
# no_log: True
tags:
- db-configure
@ -36,6 +36,7 @@
ansible.builtin.shell: "zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix"
args:
executable: /bin/bash
ignore_errors: True
tags:
- db-configure

View file

@ -17,6 +17,7 @@
- name: Install the zabbix rpm
command: "rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/9/x86_64/zabbix-release-6.0-4.el9.noarch.rpm"
ignore_errors: True
tags:
- packages

View file

@ -1,7 +1,6 @@
---
- include_tasks: install.yml
# - include_tasks: db.yml
# - include_tasks: plugins.yml
- include_tasks: start_services.yml