ansible-role-kojihub/tasks/koji-admin-local.yml

49 lines
1.4 KiB
YAML
Raw Normal View History

2020-12-23 09:12:56 +00:00
---
# Create the koji admin user
- name: Create local koji admin user
2022-03-28 02:54:44 +00:00
ansible.builtin.user:
2020-12-23 11:27:08 +00:00
name: "{{ koji_admin_localuser_name }}"
comment: "Local Koji Admin"
2020-12-23 09:12:56 +00:00
- name: Create koji config directory
2022-03-28 02:54:44 +00:00
ansible.builtin.file:
2020-12-23 09:12:56 +00:00
path: "/home/{{ koji_admin_localuser_name }}/.koji"
state: directory
owner: "{{ koji_admin_localuser_name }}"
group: "{{ koji_admin_localuser_name }}"
2020-12-23 19:46:25 +00:00
mode: '0700'
2020-12-23 09:12:56 +00:00
recurse: true
- name: Reset permissions
2022-03-28 02:54:44 +00:00
ansible.builtin.file:
2020-12-23 09:12:56 +00:00
path: "/home/{{ koji_admin_localuser_name }}"
state: directory
owner: "{{ koji_admin_localuser_name }}"
group: "{{ koji_admin_localuser_name }}"
mode: '0700'
- name: Configure the koji client
2022-03-28 02:54:44 +00:00
ansible.builtin.template:
2020-12-23 09:12:56 +00:00
src: koji-client-config.j2
dest: "/home/{{ koji_admin_localuser_name }}/.koji/config"
owner: "{{ koji_admin_localuser_name }}"
group: "{{ koji_admin_localuser_name }}"
mode: '0644'
- name: Ensuring we have our scripts store
2022-03-28 02:54:44 +00:00
ansible.builtin.file:
2020-12-23 09:12:56 +00:00
path: /opt/rocky-tools/scripts
state: directory
owner: "{{ koji_admin_localuser_name }}"
group: "{{ koji_admin_localuser_name }}"
mode: '0750'
recurse: true
# name: Cron job to rebuild repos
# cron:
# name: "Regenerate repos"
# job: "/opt/rocky-tools/scripts/regen_build_repos.sh > /dev/null 2>&1"
# minute: "5"
# hour: "3"
# user: "{{ koji_admin_localuser_name }}"