ansible-koji/roles/caddy/tasks/main.yaml
Rénich Bon Ćirić c290878c96
feat: deploy Caddy repository server for BaseOS packages
- Provision cs10-repo.mx-os VM with 500 GB system disk using OpenTofu.
- Create and apply Ansible role to install and configure Caddy to serve /srv/repo/.
- Update Koji Hub export script to rsync signed binary RPMs to the repo server and trigger createrepo_c.
- Record ADR-05 detailing this design decision and update package compilation guide.
- Log progress in the project journal.

Co-developed-by: Gemini AI <renich+gemini@woralelandia.com>
Signed-off-by: Rénich Bon Ćirić <renich@woralelandia.com>
2026-06-16 16:10:32 -06:00

44 lines
1 KiB
YAML

---
- name: Enable Caddy Copr repository
ansible.builtin.command: dnf copr enable -y @caddy/caddy
args:
creates: /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:group_caddy:caddy.repo
- name: Install Caddy
ansible.builtin.dnf:
name: caddy
state: present
- name: Create repository directory
ansible.builtin.file:
path: /srv/repo
state: directory
mode: '0755'
owner: root
group: root
- name: Deploy Caddyfile
ansible.builtin.template:
src: Caddyfile.j2
dest: /etc/caddy/Caddyfile
owner: root
group: root
mode: '0644'
notify: Restart caddy
- name: Gather service facts
ansible.builtin.service_facts:
- name: Allow HTTP port in firewalld
ansible.builtin.firewalld:
service: http
permanent: true
state: enabled
immediate: true
when: ansible_facts.services['firewalld.service'] is defined and ansible_facts.services['firewalld.service'].state == 'running'
- name: Ensure Caddy is started and enabled
ansible.builtin.systemd:
name: caddy
state: started
enabled: true