pull docker images before restart; don't recursively edit premissions; use base_path in docker-compose.yaml
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 33s
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 33s
This commit is contained in:
parent
14da8cd5a1
commit
115ab7e840
@ -2,6 +2,10 @@
|
|||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: backup.yaml
|
file: backup.yaml
|
||||||
|
|
||||||
|
- name: Ensure Docker images are up to date
|
||||||
|
community.docker.docker_compose_v2_pull:
|
||||||
|
project_src: /opt/gitea
|
||||||
|
|
||||||
- name: Ensure Gitea is restarted
|
- name: Ensure Gitea is restarted
|
||||||
community.docker.docker_compose_v2:
|
community.docker.docker_compose_v2:
|
||||||
project_src: /opt/gitea
|
project_src: /opt/gitea
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
owner: "{{ git_user.uid }}"
|
owner: "{{ git_user.uid }}"
|
||||||
group: "{{ git_user.group }}"
|
group: "{{ git_user.group }}"
|
||||||
mode: "700"
|
mode: "700"
|
||||||
recurse: true
|
|
||||||
with_items: ["data", "config"]
|
with_items: ["data", "config"]
|
||||||
|
|
||||||
- name: Ensure docker daemon is started
|
- name: Ensure docker daemon is started
|
||||||
@ -85,6 +84,7 @@
|
|||||||
owner: root
|
owner: root
|
||||||
mode: "600"
|
mode: "600"
|
||||||
notify:
|
notify:
|
||||||
|
- Ensure Docker images are up to date
|
||||||
- Output docker compose state
|
- Output docker compose state
|
||||||
- Ensure Gitea is restarted
|
- Ensure Gitea is restarted
|
||||||
- Wait until Gitea is up
|
- Wait until Gitea is up
|
||||||
|
@ -15,8 +15,8 @@ services:
|
|||||||
image: gitea/gitea:{{ gitea_vars['version'] }}-rootless
|
image: gitea/gitea:{{ gitea_vars['version'] }}-rootless
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- /var/lib/gitea/data:/var/lib/gitea
|
- {{ gitea_vars.base_path }}/data:/var/lib/gitea
|
||||||
- /var/lib/gitea/config:/etc/gitea
|
- {{ gitea_vars.base_path }}/config:/etc/gitea
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ports:
|
ports:
|
||||||
@ -40,6 +40,6 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- gitea
|
- gitea
|
||||||
volumes:
|
volumes:
|
||||||
- /var/lib/gitea/mysql:/var/lib/mysql
|
- {{ gitea_vars.base_path }}/mysql:/var/lib/mysql
|
||||||
cap_add:
|
cap_add:
|
||||||
- SYS_NICE
|
- SYS_NICE
|
||||||
|
Loading…
Reference in New Issue
Block a user