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:
parent
08c38d3d56
commit
39aeb2d6b6
91 changed files with 1037 additions and 957 deletions
46
roles/nfs_client/tasks/main.yaml
Normal file
46
roles/nfs_client/tasks/main.yaml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# SPDX-License-Identifier: MIT-0
|
||||
---
|
||||
- name: Install NFS client packages
|
||||
ansible.builtin.package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
loop:
|
||||
- nfs-utils
|
||||
- nfs4-acl-tools
|
||||
- policycoreutils-python-utils
|
||||
|
||||
- name: Create mount point directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ koji_top_dir }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: Add NFS server to /etc/hosts
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/hosts
|
||||
line: "{{ hostvars[groups['kojifs'][0]].ansible_default_ipv4.address }} {{ koji_nfs_host }}"
|
||||
state: present
|
||||
mode: "0644"
|
||||
|
||||
- name: Mount the Koji NFS share
|
||||
ansible.posix.mount:
|
||||
path: "{{ koji_top_dir }}"
|
||||
src: "{{ koji_nfs_host }}:{{ koji_top_dir }}"
|
||||
fstype: nfs
|
||||
opts: "rw,sync"
|
||||
state: mounted
|
||||
|
||||
- name: Set SELinux context for Koji NFS mount
|
||||
ansible.builtin.command: semanage fcontext -a -t nfs_t "{{ koji_top_dir }}(/.*)?"
|
||||
changed_when: false
|
||||
check_mode: false
|
||||
|
||||
- name: Apply SELinux context
|
||||
ansible.builtin.command: restorecon -R "{{ koji_top_dir }}"
|
||||
changed_when: false
|
||||
check_mode: false
|
||||
|
||||
- name: Flush systemd journal to disk
|
||||
ansible.builtin.command: journalctl --flush
|
||||
changed_when: false
|
||||
check_mode: false
|
||||
Loading…
Reference in a new issue