Files
Kamino/roles/gitea/tasks/install.yml
T
Defame1297 cf2286b7a7 test(roles): run molecule's check step before and after converge
Every role scenario with a converge now runs check right before it (a
fresh host) and right after it (a configured host), and a script test
fails a scenario without both. pihole and pve_lxc move their second
check from after idempotence to after converge to match.

The roles that failed under --check on a fresh host get the two allowed
guards: cloudflared, docker, gitea, gitea_runner, traefik and
user_management. ufw and fail2ban preview only a host where their
package is installed, as their READMEs now say.

Closes #134

Assisted-by: Claude Code
2026-11-26 10:11:54 +00:00

45 lines
1.2 KiB
YAML

---
- name: Create directories for Gitea
become: true
ansible.builtin.file:
path: "{{ gitea_data_dir }}"
state: directory
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: "0750"
loop: "{{ gitea_data_dirs }}"
loop_control:
loop_var: gitea_data_dir
tags: [gitea, install, update]
- name: Create application config directory
become: true
ansible.builtin.file:
path: "{{ gitea_app_dir }}"
state: directory
owner: root
group: "{{ gitea_group }}"
mode: "0770"
tags: [gitea, install, update]
- name: Download, verify and install the Gitea binary
ansible.builtin.include_tasks: download.yml
vars:
gitea_download_dest: "{{ gitea_install_dir }}/gitea"
tags: [gitea, install]
- name: Ensure Gitea binary exists
ansible.builtin.stat:
path: "{{ gitea_install_dir }}/gitea"
register: gitea_binary
tags: [gitea, install, health, update]
- name: Fail if Gitea binary missing
ansible.builtin.assert:
that:
- gitea_binary.stat.exists
fail_msg: "Gitea binary not found after download"
# Nothing is downloaded under --check.
when: not ansible_check_mode
tags: [gitea, install, health, update]