refactor(ansible): Estandariza nombres de roles y actualiza Koji

Se estandarizan los nombres de los directorios de roles, cambiando guiones por guiones bajos.

Se añaden nuevos scripts para limpieza y callbacks en Koji Hub. Además, se actualizan las configuraciones de Kojid, Kojira y PostgreSQL, incluyendo la instalación de paquetes, ajustes de mock y la gestión de variables.
This commit is contained in:
Rénich Bon Ćirić 2025-11-15 20:07:11 -06:00
commit 39aeb2d6b6
Signed by: renich
GPG key ID: AB2A9F49384FE324
91 changed files with 1037 additions and 957 deletions

View file

@ -1,4 +1,4 @@
#SPDX-License-Identifier: MIT-0
# SPDX-License-Identifier: MIT-0
---
- name: Install PostgreSQL packages
ansible.builtin.dnf:
@ -43,34 +43,24 @@
state: started
enabled: true
- name: Configure PostgreSQL settings
community.postgresql.postgresql_set:
name: "{{ item.name }}"
value: "{{ item.value }}"
- name: Configure PostgreSQL settings for SSL and listening
ansible.builtin.lineinfile:
path: /var/lib/pgsql/data/postgresql.conf
regexp: "^{{ item.regexp }}"
line: "{{ item.line }}"
state: present
backup: true
loop:
- { name: 'ssl_ca_file', value: 'ca.crt' }
- { name: 'ssl', value: 'on' }
- { name: 'ssl_cert_file', value: 'server.crt' }
- { name: 'ssl_key_file', value: 'server.key' }
- { name: 'max_connections', value: '200' }
- { name: 'listen_addresses', value: '*' }
- { regexp: '#?ssl\\s*=\\s*.*', line: "ssl = on" }
- { regexp: '#?ssl_cert_file\\s*=\\s*.*', line: "ssl_cert_file = 'server.crt'" }
- { regexp: '#?ssl_key_file\\s*=\\s*.*', line: "ssl_key_file = 'server.key'" }
- { regexp: '#?ssl_ca_file\\s*=\\s*.*', line: "ssl_ca_file = 'ca.crt'" }
- { regexp: '#?listen_addresses\\s*=\\s*.*', line: "listen_addresses = '*'" }
- { regexp: '#?max_connections\\s*=\\s*.*', line: "max_connections = 200" }
become: true
become_user: postgres
notify: Restart postgresql
- name: Remove old pg_hba.conf entry for Koji hub (IPv4 network)
community.postgresql.postgresql_pg_hba:
dest: /var/lib/pgsql/data/pg_hba.conf
contype: hostssl
databases: "{{ koji_db_name }}"
users: "{{ koji_db_user }}"
address: "{{ koji_db_network }}"
method: scram-sha-256
state: absent
notify: Restart postgresql
- name: Configure pg_hba.conf to allow connection from the Koji hub (IPv4 address)
community.postgresql.postgresql_pg_hba:
dest: /var/lib/pgsql/data/pg_hba.conf