homeserver/roles/riemers.gitlab-runner/handlers/main.yml

26 lines
795 B
YAML
Raw Normal View History

2021-02-13 14:20:18 +01:00
---
# non macOS
- name: restart_gitlab_runner
service: name=gitlab-runner state={{ gitlab_runner_restart_state }}
become: yes
when: ansible_os_family != 'Darwin' and ansible_os_family != 'Windows' and not gitlab_runner_container_install
# macOS
- name: restart_gitlab_runner_macos
command: "{{ gitlab_runner_executable }} restart"
become: "{{ gitlab_runner_system_mode }}"
when: ansible_os_family == 'Darwin'
- name: restart_gitlab_runner_windows
win_command: "{{ gitlab_runner_executable }} restart"
args:
chdir: "{{ gitlab_runner_config_file_location }}"
when: ansible_os_family == 'Windows'
# Container
- name: restart_gitlab_runner_container
docker_container:
name: "{{ gitlab_runner_container_name }}"
restart: yes
when: gitlab_runner_container_install