This commit is contained in:
nazunalika 2022-03-27 19:54:44 -07:00
parent 77576bf98a
commit 6bd7b30f90
Signed by: label
GPG Key ID: 6735C0E1BD65D048
10 changed files with 29 additions and 27 deletions

View File

@ -1,10 +1,10 @@
---
- name: restart_kojira
service:
ansible.builtin.service:
name: kojira
state: restarted
- name: restart_httpd
service:
ansible.builtin.service:
name: httpd
state: restarted

View File

@ -9,4 +9,6 @@ galaxy_info:
versions:
- 8
galaxy_tags: []
dependencies: []
dependencies:
- ansible.posix
- community.general

View File

@ -1,7 +1,7 @@
---
# Note: We do not install postgresql. It's up to you to do so, whether locally or not.
- name: Template for koji admin and kojira
template:
ansible.builtin.template:
src: koji-pgsql.sql.j2
dest: /var/tmp/koji-pgsql.sql
mode: '0644'

View File

@ -1,7 +1,7 @@
---
# Setup the IPA service account
- name: Create koji config directory
file:
ansible.builtin.file:
path: "/home/{{ koji_admin_user }}/.koji"
state: directory
owner: "{{ koji_admin_user }}"
@ -10,7 +10,7 @@
recurse: true
- name: Reset permissions
file:
ansible.builtin.file:
path: "/home/{{ koji_admin_user }}"
state: directory
owner: "{{ koji_admin_user }}"
@ -18,7 +18,7 @@
mode: '0700'
- name: Configure the koji client
template:
ansible.builtin.template:
src: koji-client-config.j2
dest: "/home/{{ koji_admin_user }}/.koji/config"
owner: "{{ koji_admin_user }}"
@ -26,7 +26,7 @@
mode: '0644'
- name: Ensuring we have our scripts store
file:
ansible.builtin.file:
path: /opt/rocky-tools/scripts
state: directory
owner: "{{ koji_admin_user }}"

View File

@ -1,12 +1,12 @@
---
# Create the koji admin user
- name: Create local koji admin user
user:
ansible.builtin.user:
name: "{{ koji_admin_localuser_name }}"
comment: "Local Koji Admin"
- name: Create koji config directory
file:
ansible.builtin.file:
path: "/home/{{ koji_admin_localuser_name }}/.koji"
state: directory
owner: "{{ koji_admin_localuser_name }}"
@ -15,7 +15,7 @@
recurse: true
- name: Reset permissions
file:
ansible.builtin.file:
path: "/home/{{ koji_admin_localuser_name }}"
state: directory
owner: "{{ koji_admin_localuser_name }}"
@ -23,7 +23,7 @@
mode: '0700'
- name: Configure the koji client
template:
ansible.builtin.template:
src: koji-client-config.j2
dest: "/home/{{ koji_admin_localuser_name }}/.koji/config"
owner: "{{ koji_admin_localuser_name }}"
@ -31,7 +31,7 @@
mode: '0644'
- name: Ensuring we have our scripts store
file:
ansible.builtin.file:
path: /opt/rocky-tools/scripts
state: directory
owner: "{{ koji_admin_localuser_name }}"

View File

@ -1,7 +1,7 @@
---
# Configure gc
- name: Configure garbage collector
template:
ansible.builtin.template:
src: etc/koji-gc/koji-gc.conf.j2
dest: /etc/koji-gc/koji-gc.conf
owner: root
@ -9,6 +9,6 @@
mode: '0644'
- name: Enable the gc timer
service:
ansible.builtin.service:
name: koji-gc.timer
enabled: true

View File

@ -1,7 +1,7 @@
---
# Kojira
- name: Configure kojira
template:
ansible.builtin.template:
src: etc/kojira/kojira.conf.j2
dest: /etc/kojira/kojira.conf
mode: '0644'
@ -9,7 +9,7 @@
- restart_kojira
- name: Ensure kojira is running
service:
ansible.builtin.service:
name: kojira
state: started
enabled: yes

View File

@ -9,7 +9,7 @@
import_tasks: storage.yml
- name: Install required packages
yum:
ansible.builtin.dnf:
name: "{{ koji_hub_packages }}"
state: present
@ -25,7 +25,7 @@
when: koji_hub_plugins
- name: Configure kojihub and web
template:
ansible.builtin.template:
src: "{{ item }}.j2"
dest: "/{{ item }}"
mode: '0644'
@ -41,7 +41,7 @@
import_tasks: kojira.yml
- name: Configure httpd for hub and web
template:
ansible.builtin.template:
src: "etc/httpd/conf.d/{{ item }}.j2"
dest: "/etc/httpd/conf.d/{{ item }}"
mode: '0644'
@ -54,7 +54,7 @@
- restart_httpd
- name: Configure robots.txt
copy:
ansible.builtin.copy:
src: "var/www/html/robots.txt"
dest: "/var/www/html/robots.txt"
owner: root
@ -64,7 +64,7 @@
- restart_httpd
- name: Deploy custom theme for koji
unarchive:
ansible.builtin.unarchive:
src: "{{ koji_theme_file }}"
dest: /
when: koji_theme

View File

@ -1,14 +1,14 @@
---
# Plugins
- name: Deploying enabled plugins
copy:
ansible.builtin.copy:
src: "plugins/{{ item }}.py"
dest: "/usr/lib/koji-hub-plugins/{{ item }}.py"
mode: 0755
with_items: "{{ koji_hub_plugins_list }}"
- name: Configuring enabled plugins
template:
ansible.builtin.template:
src: "etc/koji-hub/plugins/{{ item }}.conf.j2"
dest: "/etc/koji-hub/plugins/{{ item }}.conf"
mode: 0644

View File

@ -1,7 +1,7 @@
---
# Storage
- name: Ensure the koji mountpoint exists
file:
ansible.builtin.file:
path: "{{ koji_mount }}"
state: directory
owner: '48'
@ -9,7 +9,7 @@
mode: '0755'
- name: Mount the NFS store
mount:
ansible.builtin.mount:
path: "{{ koji_mount }}"
src: "{{ koji_nfs_path }}"
fstype: nfs
@ -17,7 +17,7 @@
when: koji_nfs
- name: Create required default directories
file:
ansible.builtin.file:
path: "{{ koji_mount }}/{{ item }}"
state: directory
owner: '48'