|
1 | 1 | --- |
2 | 2 | - name: Install GitLab Runner (Debian) |
3 | 3 | ansible.builtin.include_tasks: install-debian.yml |
4 | | - when: ansible_os_family == 'Debian' |
| 4 | + when: ansible_facts['os_family'] == 'Debian' |
5 | 5 |
|
6 | 6 | - name: Install GitLab Runner (RedHat) |
7 | 7 | ansible.builtin.include_tasks: install-redhat.yml |
8 | | - when: ansible_os_family == 'RedHat' |
| 8 | + when: ansible_facts['os_family'] == 'RedHat' |
9 | 9 |
|
10 | 10 | - name: Install GitLab Runner (macOS) |
11 | 11 | ansible.builtin.include_tasks: install-macos.yml |
12 | | - when: ansible_os_family == 'Darwin' |
| 12 | + when: ansible_facts['os_family'] == 'Darwin' |
13 | 13 |
|
14 | 14 | - name: Install GitLab Runner (Arch) |
15 | 15 | ansible.builtin.include_tasks: install-arch.yml |
16 | | - when: ansible_os_family == 'Archlinux' |
| 16 | + when: ansible_facts['os_family'] == 'Archlinux' |
17 | 17 |
|
18 | 18 | - name: (Unix) Delete runners which were removed in GitLab |
19 | 19 | ansible.builtin.command: "{{ gitlab_runner_executable }} verify --delete" |
|
28 | 28 | - name: (Unix) Register GitLab Runner |
29 | 29 | ansible.builtin.include_tasks: register-runner.yml |
30 | 30 | vars: |
31 | | - actual_gitlab_runner_name: "{{ gitlab_runner.name | default(ansible_hostname + '-' + gitlab_runner_index | string) }}" |
| 31 | + actual_gitlab_runner_name: "{{ gitlab_runner.name | default(ansible_facts['hostname'] + '-' + gitlab_runner_index | string) }}" |
32 | 32 | when: gitlab_runner.token is defined or gitlab_runner_registration_token | string | length > 0 |
33 | 33 | loop: "{{ gitlab_runner_runners }}" |
34 | 34 | loop_control: |
|
43 | 43 | - name: Set global options (macOS/Debian/RedHat) |
44 | 44 | ansible.builtin.import_tasks: global-setup.yml |
45 | 45 | when: gitlab_runner_config_update_mode == 'by_config_toml' or |
46 | | - gitlab_runner_config_update_mode == 'by_registering' |
| 46 | + gitlab_runner_config_update_mode == 'by_registering' |
47 | 47 |
|
48 | 48 | - name: (Unix) Configure GitLab Runner |
49 | 49 | ansible.builtin.include_tasks: config-runners.yml |
|
0 commit comments