Skip to content

Commit d3b9a48

Browse files
Merge pull request #182 from MonolithProjects/develop
Develop
2 parents 9970c76 + 870e562 commit d3b9a48

File tree

9 files changed

+25
-25
lines changed

9 files changed

+25
-25
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ runner_download_repository: "actions/runner"
101101
runner_extra_config_args: ""
102102

103103
# Name to assign to this runner in GitHub (System hostname as default)
104-
runner_name: "{{ ansible_hostname }}"
104+
runner_name: "{{ ansible_facts.hostname }}"
105105

106106
# GitHub Repository user or Organization owner used for Runner registration
107107
# github_account: "youruser"

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ runner_download_repository: "actions/runner"
4343
runner_extra_config_args: ""
4444

4545
# Name to assign to this runner in GitHub (System hostname as default)
46-
runner_name: "{{ ansible_hostname }}"
46+
runner_name: "{{ ansible_facts.hostname }}"
4747

4848
# GitHub Repository user or Organization owner used for Runner registration
4949
# github_account: "youruser"

molecule/org/verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
runner_org: yes
1111
github_api_url: "https://api.github.com"
1212
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
13-
runner_name: "{{ ansible_hostname }}"
13+
runner_name: "{{ ansible_facts.hostname }}"
1414

1515
tasks:
1616
- name: Give the runners a minute

molecule/repo/verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
github_account: monolithprojects-testorg
1111
github_api_url: "https://api.github.com"
1212
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
13-
runner_name: "{{ ansible_hostname }}"
13+
runner_name: "{{ ansible_facts.hostname }}"
1414

1515
tasks:
1616
- name: Give the runners some time

tasks/collect_info.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
- name: Set runner_system variable
5555
ansible.builtin.set_fact:
56-
runner_system: "{{ 'osx' if ansible_system == 'Darwin' else 'linux' }}"
56+
runner_system: "{{ 'osx' if ansible_facts.system == 'Darwin' else 'linux' }}"
5757

5858
- name: Find the latest runner version (RUN ONCE)
5959
ansible.builtin.uri:
@@ -74,4 +74,4 @@
7474
- name: Get systemd service facts
7575
ansible.builtin.service_facts:
7676
register: service_facts
77-
when: ansible_system == "Linux"
77+
when: ansible_facts.system == "Linux"

tasks/install_deps.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- libicu57
1212
state: present
1313
update_cache: true
14-
when: (ansible_distribution == "Debian" and ansible_distribution_major_version == "9")
14+
when: (ansible_facts.distribution == "Debian" and ansible_facts.distribution_major_version == "9")
1515

1616
- name: Install dependencies on Debian Buster
1717
ansible.builtin.package:
@@ -24,7 +24,7 @@
2424
- libicu63
2525
state: present
2626
update_cache: true
27-
when: (ansible_distribution == "Debian" and ansible_distribution_major_version == "10")
27+
when: (ansible_facts.distribution == "Debian" and ansible_facts.distribution_major_version == "10")
2828

2929
- name: Install dependencies on Debian Bullseye
3030
ansible.builtin.package:
@@ -37,7 +37,7 @@
3737
- libicu67
3838
state: present
3939
update_cache: true
40-
when: (ansible_distribution == "Debian" and ansible_distribution_major_version == "11")
40+
when: (ansible_facts.distribution == "Debian" and ansible_facts.distribution_major_version == "11")
4141

4242
- name: Install dependencies on Debian Bookworm
4343
ansible.builtin.package:
@@ -50,7 +50,7 @@
5050
- libicu72
5151
state: present
5252
update_cache: true
53-
when: (ansible_distribution == "Debian" and ansible_distribution_major_version == "12")
53+
when: (ansible_facts.distribution == "Debian" and ansible_facts.distribution_major_version == "12")
5454

5555
- name: Install dependencies on Ubuntu Xenial systems
5656
ansible.builtin.package:
@@ -63,7 +63,7 @@
6363
- libicu55
6464
state: present
6565
update_cache: true
66-
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16")
66+
when: (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version == "16")
6767

6868
- name: Install dependencies on Ubuntu Bionic systems
6969
ansible.builtin.package:
@@ -76,7 +76,7 @@
7676
- libicu60
7777
state: present
7878
update_cache: true
79-
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "18")
79+
when: (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version == "18")
8080

8181
- name: Install dependencies on Ubuntu Focal systems
8282
ansible.builtin.package:
@@ -89,7 +89,7 @@
8989
- libicu66
9090
state: present
9191
update_cache: true
92-
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "20")
92+
when: (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version == "20")
9393

9494
- name: Install dependencies on Ubuntu Jammy systems
9595
ansible.builtin.package:
@@ -101,7 +101,7 @@
101101
- libicu70
102102
state: present
103103
update_cache: true
104-
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "22")
104+
when: (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version == "22")
105105

106106
- name: Install dependencies on RHEL/CentOS/Fedora systems
107107
ansible.builtin.package:
@@ -113,7 +113,7 @@
113113
- libicu
114114
state: present
115115
update_cache: true
116-
when: (ansible_distribution == "RedHat") or
117-
(ansible_distribution == "CentOS") or
118-
(ansible_distribution == "Fedora") or
119-
(ansible_distribution == "Rocky")
116+
when: (ansible_facts.distribution == "RedHat") or
117+
(ansible_facts.distribution == "CentOS") or
118+
(ansible_facts.distribution == "Fedora") or
119+
(ansible_facts.distribution == "Rocky")

tasks/install_runner.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
remote_src: true
3030
mode: "0755"
3131
environment:
32-
PATH: /usr/local/bin:/opt/homebrew/bin/:{{ ansible_env.HOME }}/bin:{{ ansible_env.PATH }}
32+
PATH: /usr/local/bin:/opt/homebrew/bin/:{{ ansible_facts.user_dir }}/bin:{{ ansible_facts.env.PATH }}
3333
when: runner_version not in runner_installed.stdout or reinstall_runner
3434

3535
- name: Configure custom env file if required
@@ -111,7 +111,7 @@
111111
args:
112112
chdir: "{{ runner_dir }}"
113113
changed_when: true
114-
become: "{{ 'false' if ansible_system == 'Darwin' else 'true' }}"
114+
become: "{{ 'false' if ansible_facts.system == 'Darwin' else 'true' }}"
115115
when: not runner_service_file_path.stat.exists
116116

117117
- name: Read service name from file
@@ -127,7 +127,7 @@
127127
ignore_errors: "{{ ansible_check_mode }}"
128128
changed_when: true
129129
when: >
130-
ansible_system != 'Darwin' and
130+
ansible_facts.system != 'Darwin' and
131131
runner_state|lower == "started" and
132132
ansible_facts.services[(runner_service.content | b64decode) | trim ]['state'] != 'running'
133133
@@ -139,7 +139,7 @@
139139
no_log: "{{ hide_sensitive_logs | bool }}"
140140
ignore_errors: "{{ ansible_check_mode }}"
141141
changed_when: true
142-
when: ansible_system == 'Darwin' and runner_state|lower
142+
when: ansible_facts.system == 'Darwin' and runner_state|lower
143143

144144
- name: STOP and disable Github Actions Runner service # noqa no-changed-when
145145
ansible.builtin.command: "./svc.sh stop"
@@ -156,7 +156,7 @@
156156
args:
157157
chdir: "{{ runner_dir }}"
158158
changed_when: true
159-
become: "{{ 'false' if ansible_system == 'Darwin' else 'true' }}"
159+
become: "{{ 'false' if ansible_facts.system == 'Darwin' else 'true' }}"
160160
no_log: "{{ hide_sensitive_logs | bool }}"
161161
ignore_errors: "{{ ansible_check_mode }}"
162162
when: runner_version not in runner_installed.stdout and not runner_state|lower == "stopped"

tasks/uninstall_runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
args:
1010
chdir: "{{ runner_dir }}"
1111
changed_when: true
12-
become: "{{ 'false' if ansible_system == 'Darwin' else 'true' }}"
12+
become: "{{ 'false' if ansible_facts.system == 'Darwin' else 'true' }}"
1313
when: runner_service_file_path.stat.exists
1414

1515
- name: Check GitHub Actions runner file

vars/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ github_actions_architecture_map:
55
x86_64: x64
66
armv7l: arm
77
aarch64: arm64
8-
github_actions_architecture: "{{ github_actions_architecture_map[ansible_architecture] }}"
8+
github_actions_architecture: "{{ github_actions_architecture_map[ansible_facts.architecture] }}"

0 commit comments

Comments
 (0)