Skip to content

Commit 18ec404

Browse files
fix linting and format
1 parent e8bf4f0 commit 18ec404

File tree

3 files changed

+87
-87
lines changed

3 files changed

+87
-87
lines changed

.pre-commit-config.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.0.1
4-
hooks:
5-
- id: check-yaml
6-
args: [--allow-multiple-documents]
7-
- id: end-of-file-fixer
8-
- id: trailing-whitespace
9-
args: [--markdown-linebreak-ext=md]
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.0.1
4+
hooks:
5+
- id: check-yaml
6+
args: [--allow-multiple-documents]
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
args: [--markdown-linebreak-ext=md]
1010

11-
- repo: https://github.com/adrienverge/yamllint
12-
rev: v1.26.3
13-
hooks:
14-
- id: yamllint
15-
args: [-c=.yamllint]
11+
- repo: https://github.com/adrienverge/yamllint
12+
rev: v1.26.3
13+
hooks:
14+
- id: yamllint
15+
args: [-c=.yamllint]
1616

17-
- repo: https://github.com/robertdebock/pre-commit
18-
rev: v1.2.3
19-
hooks:
20-
- id: ansible_role_find_unused_variable
21-
- id: ansible_role_find_empty_files
22-
- id: ansible_role_find_empty_directories
23-
- id: ansible_role_fix_readability
17+
- repo: https://github.com/robertdebock/pre-commit
18+
rev: v1.2.3
19+
hooks:
20+
- id: ansible_role_find_unused_variable
21+
- id: ansible_role_find_empty_files
22+
- id: ansible_role_find_empty_directories
23+
- id: ansible_role_fix_readability

defaults/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ runner_version: "latest"
1212
runner_state: "started"
1313

1414
# If found on the server, delete already existing runner service and install it again
15-
reinstall_runner: no
15+
reinstall_runner: false
1616

1717
# Do not show Ansible logs which may contain sensitive data (registration token)
18-
hide_sensitive_logs: yes
18+
hide_sensitive_logs: true
1919

2020
# GitHub address
2121
github_url: "https://github.com"
@@ -27,7 +27,7 @@ github_api_url: "https://api.github.com"
2727
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
2828

2929
# Is it the runner for organization or not?
30-
runner_org: no
30+
runner_org: false
3131

3232
# Labels to apply to the runner
3333
runner_labels: []

tasks/collect_info.yml

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,76 +2,76 @@
22
- name: Info collections
33
check_mode: false
44
block:
5-
- name: Set complete API url for repo runner
6-
ansible.builtin.set_fact:
7-
github_full_api_url: "{{ github_api_url }}/repos/{{ github_owner | default(github_account) }}/{{ github_repo }}/actions/runners"
8-
when: not runner_org and not github_enterprise
5+
- name: Set complete API url for repo runner
6+
ansible.builtin.set_fact:
7+
github_full_api_url: "{{ github_api_url }}/repos/{{ github_owner | default(github_account) }}/{{ github_repo }}/actions/runners"
8+
when: not runner_org and not github_enterprise
99

10-
- name: Set complete API url for org runner
11-
ansible.builtin.set_fact:
12-
github_full_api_url: "{{ github_api_url }}/orgs/{{ github_owner | default(github_account) }}/actions/runners"
13-
when: runner_org | bool and not github_enterprise
10+
- name: Set complete API url for org runner
11+
ansible.builtin.set_fact:
12+
github_full_api_url: "{{ github_api_url }}/orgs/{{ github_owner | default(github_account) }}/actions/runners"
13+
when: runner_org | bool and not github_enterprise
1414

15-
- name: Set complete API url for enterprise runner
16-
ansible.builtin.set_fact:
17-
github_full_api_url: "{{ github_api_url }}/enterprises/{{ github_enterprise }}/actions/runners"
18-
when: github_enterprise
15+
- name: Set complete API url for enterprise runner
16+
ansible.builtin.set_fact:
17+
github_full_api_url: "{{ github_api_url }}/enterprises/{{ github_enterprise }}/actions/runners"
18+
when: github_enterprise
1919

20-
- name: Get registration token (RUN ONCE)
21-
ansible.builtin.uri:
22-
url: "{{ github_full_api_url }}/registration-token"
23-
headers:
24-
Authorization: "token {{ access_token }}"
25-
Accept: "application/vnd.github.v3+json"
26-
method: POST
27-
status_code: 201
28-
force_basic_auth: yes
29-
register: registration
30-
run_once: true
20+
- name: Get registration token (RUN ONCE)
21+
ansible.builtin.uri:
22+
url: "{{ github_full_api_url }}/registration-token"
23+
headers:
24+
Authorization: "token {{ access_token }}"
25+
Accept: "application/vnd.github.v3+json"
26+
method: POST
27+
status_code: 201
28+
force_basic_auth: true
29+
register: registration
30+
run_once: true
3131

32-
- name: Check currently registered runners (RUN ONCE)
33-
ansible.builtin.uri:
34-
url: "{{ github_full_api_url }}"
35-
headers:
36-
Authorization: "token {{ access_token }}"
37-
Accept: "application/vnd.github.v3+json"
38-
method: GET
39-
status_code: 200
40-
force_basic_auth: yes
41-
register: registered_runners
42-
run_once: true
32+
- name: Check currently registered runners (RUN ONCE)
33+
ansible.builtin.uri:
34+
url: "{{ github_full_api_url }}"
35+
headers:
36+
Authorization: "token {{ access_token }}"
37+
Accept: "application/vnd.github.v3+json"
38+
method: GET
39+
status_code: 200
40+
force_basic_auth: true
41+
register: registered_runners
42+
run_once: true
4343

44-
- name: Get Runner User IDs
45-
ansible.builtin.command: id -u "{{ runner_user }}"
46-
changed_when: false
47-
register: runner_user_id
44+
- name: Get Runner User IDs
45+
ansible.builtin.command: id -u "{{ runner_user }}"
46+
changed_when: false
47+
register: runner_user_id
4848

49-
- name: Get Runner Group IDs
50-
ansible.builtin.command: id -g "{{ runner_user }}"
51-
changed_when: false
52-
register: runner_user_group_id
49+
- name: Get Runner Group IDs
50+
ansible.builtin.command: id -g "{{ runner_user }}"
51+
changed_when: false
52+
register: runner_user_group_id
5353

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

58-
- name: Find the latest runner version (RUN ONCE)
59-
ansible.builtin.uri:
60-
url: "https://api.github.com/repos/{{ runner_download_repository }}/releases/latest"
61-
headers:
62-
Content-Type: "application/json"
63-
method: GET
64-
return_content: yes
65-
status_code: 200
66-
body_format: json
67-
check_mode: false
68-
register: api_response
69-
run_once: true
70-
become: false
71-
delegate_to: localhost
72-
when: runner_version == "latest"
58+
- name: Find the latest runner version (RUN ONCE)
59+
ansible.builtin.uri:
60+
url: "https://api.github.com/repos/{{ runner_download_repository }}/releases/latest"
61+
headers:
62+
Content-Type: "application/json"
63+
method: GET
64+
return_content: true
65+
status_code: 200
66+
body_format: json
67+
check_mode: false
68+
register: api_response
69+
run_once: true
70+
become: false
71+
delegate_to: localhost
72+
when: runner_version == "latest"
7373

74-
- name: Get systemd service facts
75-
ansible.builtin.service_facts:
76-
register: service_facts
77-
when: ansible_system == "Linux"
74+
- name: Get systemd service facts
75+
ansible.builtin.service_facts:
76+
register: service_facts
77+
when: ansible_system == "Linux"

0 commit comments

Comments
 (0)