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: Restart kojira
ansible.builtin.service:

View file

@ -1,36 +1,22 @@
# SPDX-License-Identifier: MIT-0
---
galaxy_info:
author: your name
description: your role description
company: your company (optional)
author: "Renich Bon Ciric"
description: "Koji scheduler"
company: "Mx-OS"
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
license: "GPL-2.0-or-later"
# Choose a valid license ID from https://spdx.org - some suggested licenses:
# - BSD-3-Clause (default)
# - MIT
# - GPL-2.0-or-later
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
license: license (GPL-2.0-or-later, MIT, etc)
min_ansible_version: "2.15"
min_ansible_version: 2.1
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
platforms:
- name: Fedora
versions:
- "40"
- name: EL
versions:
- "10"
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.

View file

@ -1,12 +1,10 @@
#SPDX-License-Identifier: MIT-0
# SPDX-License-Identifier: MIT-0
---
- name: Install Koji Utils package (which includes kojira)
ansible.builtin.dnf:
name: ["koji-utils"]
state: present
- name: Configure kojira
ansible.builtin.template:
src: kojira.conf.j2
@ -26,13 +24,13 @@
- { src: "kojira.key", dest: "/etc/pki/koji/kojira.key", mode: "0600" }
- name: "Concatenate certificate and key into a PEM file"
ansible.builtin.shell: cat /etc/pki/koji/kojira.crt /etc/pki/koji/kojira.key > /etc/pki/koji/kojira.pem
ansible.builtin.shell: cat /etc/pki/koji/kojira.crt /etc/pki/koji/kojira.key > {{ kojira_pem_path }}
args:
creates: /etc/pki/koji/kojira.pem
creates: "{{ kojira_pem_path }}"
- name: Set permissions on kojira PEM file
ansible.builtin.file:
path: /etc/pki/koji/kojira.pem
path: "{{ kojira_pem_path }}"
mode: "0600"
- name: Start and enable kojira service

View file

@ -1,4 +1,4 @@
[kojira]
server = https://{{ koji_hub_fqdn }}/kojihub
cert = {{ kojira_cert_path }}
cert = {{ kojira_pem_path }}
serverca = {{ koji_remote_ca_trust_path }}

View file

@ -1,6 +1,7 @@
# SPDX-License-Identifier: MIT-0
---
- hosts: localhost
- name: Test kojira role
hosts: localhost
remote_user: root
roles:
- roles/kojira
- kojira

View file

@ -1,4 +1,3 @@
# SPDX-License-Identifier: MIT-0
---
# vars file for roles/kojira