gather facts

This commit is contained in:
marito 2025-06-16 23:21:13 +00:00
parent 304bd37cae
commit 7adcb308cb

View File

@ -1,4 +1,7 @@
---
- name: "Gather service facts"
ansible.builtin.service_facts:
# ------------------ MariaDB Specific Tasks ------------------
- name: "Install MariaDB server"
@ -20,7 +23,9 @@
name: mariadb
state: stopped
enabled: no
when: db_engine != 'mariadb'
when:
- db_engine != 'mariadb'
- "'mariadb' in ansible_facts.services"
# ------------------ MySQL Specific Tasks ------------------
@ -43,7 +48,9 @@
name: mysql
state: stopped
enabled: no
when: db_engine != 'mysql'
when:
- db_engine != 'mysql'
- "'mysql' in ansible_facts.services"
# ------------------ PostgreSQL Specific Tasks ------------------
@ -69,7 +76,9 @@
name: postgresql
state: stopped
enabled: no
when: db_engine != 'postgres'
when:
- db_engine != 'postgres'
- "'postgresql' in ansible_facts.services"
- name: "Create the global Lenvi PostgreSQL user"
community.postgresql.postgresql_user: