zabbix: Update db creation task to continue when db exists

Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
This commit is contained in:
David Kirwan 2023-09-21 08:33:42 +01:00
parent 197d53a9ba
commit 0920e7ae47
No known key found for this signature in database
GPG key ID: A5893AB6474AC37D
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,21 @@
- name: Create the zabbix keytab path
file:
path: "/etc/openshift_apps/zabbix/"
state: directory
owner: root
group: root
mode: 0750
tags:
- create-keytab
- name: Acquire a keytab
include_role:
name: keytab/service
vars:
kt_location:
"/etc/openshift_apps/zabbix/zabbix_server.kt"
service: "zabbix"
host: "{{ communishift_ocp_api_hostname }}"
tags:
- create-keytab

View file

@ -29,6 +29,7 @@
- name: Configure the zabbix db
ansible.builtin.shell: "sudo -u postgres createdb -O {{ zabbix_db_user }} {{ zabbix_db_name }}"
ignore_errors: True
tags:
- db-configure