Fix some errors in gitea playbook

This commit is contained in:
flyingscorpio@clevo 2023-01-16 10:37:40 +01:00
parent 230a42bc24
commit 947723155e
3 changed files with 18 additions and 16 deletions

View file

@ -37,6 +37,8 @@
name: nftables
state: restarted
enabled: true
async: 45
poll: 5
- name: Reload nftables service
become: true

View file

@ -29,5 +29,5 @@
become: true
become_user: git
ansible.builtin.command:
cmd: "/var/lib/gitea/gitea_backup.sh restore {{ latest_gitea_dump.path }}"
cmd: "/usr/local/bin/gitea_backup.sh restore {{ latest_gitea_dump.path }}"
creates: /var/lib/gitea/gitea-repositories # when this dir exists, the command won't run, so we don't overwrite existing repos

View file

@ -9,21 +9,6 @@
- acl # for become_user: git
state: present
- name: Create needed directories
become: true
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: git
group: git
mode: 0750
with_items:
- /etc/gitea
- /var/lib/gitea
- /var/lib/gitea/custom
- /var/lib/gitea/data
- /var/log/gitea
- name: Create git group
become: true
ansible.builtin.group:
@ -44,6 +29,21 @@
shell: /bin/bash
system: true
- name: Create needed directories
become: true
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: git
group: git
mode: 0750
with_items:
- /etc/gitea
- /var/lib/gitea
- /var/lib/gitea/custom
- /var/lib/gitea/data
- /var/log/gitea
- name: Set sudoer permissions to git user
become: true
ansible.builtin.copy: