deploy_gitea_runner/tasks/install_docker.yml

28 lines
1.4 KiB
YAML
Raw Normal View History

2023-08-11 18:53:23 +00:00
---
# task/install_docker file for deploy_gitea_runner
2023-12-11 18:01:57 +00:00
- name: "Include ednxzu.docker_systemd_service"
ansible.builtin.include_role:
2023-12-11 18:01:57 +00:00
name: ednxzu.docker_systemd_service
apply:
become: true
vars:
2023-12-11 18:01:57 +00:00
docker_systemd_service_container_name: "{{ deploy_gitea_runner_name }}"
docker_systemd_service_image: "gitea/act_runner:{{ deploy_gitea_runner_version }}"
docker_systemd_service_container_env:
TZ: "{{ deploy_gitea_runner_timezone }}"
CONFIG_FILE: /config.yaml
GITEA_INSTANCE_URL: "{{ deploy_gitea_runner_server_url }}"
GITEA_RUNNER_REGISTRATION_TOKEN: "{{ deploy_gitea_runner_server_token }}"
GITEA_RUNNER_NAME: "{{ deploy_gitea_runner_name }}"
2023-12-11 18:01:57 +00:00
docker_systemd_service_flags:
- network: bridge
- volume:
- "/var/run/docker.sock:/var/run/docker.sock"
- "{{ deploy_gitea_runner_directory }}/config.yaml:/config.yaml"
- "{{ deploy_gitea_runner_directory }}/data:/data"
- "{{ deploy_gitea_runner_directory }}/cache:/cache"
- publish: "{{ [deploy_gitea_runner_config.cache.port ~ ':' ~ deploy_gitea_runner_config.cache.port] if deploy_gitea_runner_config.cache.enabled else [] }}"
docker_systemd_service_name: "{{ docker_systemd_service_container_name }}_container"
docker_systemd_service_state: "{{ 'started' if deploy_gitea_runner_start_service else 'stopped'}}"
docker_systemd_service_restart: "{{ true if deploy_gitea_runner_start_service else false}}"