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"
|
2023-12-02 22:02:05 +00:00
|
|
|
ansible.builtin.include_role:
|
2023-12-11 18:01:57 +00:00
|
|
|
name: ednxzu.docker_systemd_service
|
2023-12-02 22:02:05 +00:00
|
|
|
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:
|
2023-12-02 22:02:05 +00:00
|
|
|
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}}"
|