Compare commits

...

2 commits

Author SHA1 Message Date
dc191e4b4d
fix(README): Playbook to run the role
Signed-off-by: Julien Riou <julien@riou.xyz>
2025-08-22 19:32:34 +02:00
e4d2034f55
fix: Ensure permissions and lowercase iptables handler
- Ensure permissions on the forgejo directories or PostgreSQL won't start if
  the system is restored somewhere else
- Fix iptables handler name

Signed-off-by: Julien Riou <julien@riou.xyz>
2025-07-12 10:35:20 +02:00
2 changed files with 10 additions and 7 deletions

View file

@ -31,11 +31,9 @@ See list of [default variables](defaults/main.yml).
Example of a basic forgejo.yml playbook: Example of a basic forgejo.yml playbook:
```yaml ```yaml
hosts: - hosts: forgejo
- forgejo roles:
- forgejo
roles:
- forgejo
``` ```
Then run the playbook: Then run the playbook:

View file

@ -19,12 +19,17 @@
owner: forgejo owner: forgejo
group: forgejo group: forgejo
mode: "0755" mode: "0755"
loop: loop: &forgejo_directories
- "{{ forgejo_config_dir }}" - "{{ forgejo_config_dir }}"
- "{{ forgejo_home_dir }}" - "{{ forgejo_home_dir }}"
- "{{ forgejo_home_dir }}/server" - "{{ forgejo_home_dir }}/server"
- "{{ forgejo_home_dir }}/db" - "{{ forgejo_home_dir }}/db"
- name: ensure permissions on those directories
ansible.builtin.command:
cmd: "chown -R forgejo:forgejo {{ item }}"
loop: *forgejo_directories
- name: create docker-compose configuration - name: create docker-compose configuration
ansible.builtin.template: ansible.builtin.template:
src: "{{ item.name }}.j2" src: "{{ item.name }}.j2"
@ -57,5 +62,5 @@
jump: ACCEPT jump: ACCEPT
comment: forgejo comment: forgejo
loop: "{{ forgejo_allowed_sources }}" loop: "{{ forgejo_allowed_sources }}"
notify: Save iptables notify: save iptables
when: forgejo_manage_iptables when: forgejo_manage_iptables