Skip to content

Commit a40e06d

Browse files
committed
chore: fix ansible-lint 6.17.2
1 parent 282884c commit a40e06d

20 files changed

+188
-182
lines changed

.ansible-lint

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
12
skip_list:
23
- '106'
34
- ignore-errors
5+
exclude_paths:
6+
- .github/workflows/

.pre-commit-config.yaml

+20-20
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

+3-3
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: []

molecule/custom_env/cleanup.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
hosts: all
55
become: yes
66
vars:
7-
- runner_user: ansible
8-
- github_repo: ansible-github_actions_runner-testrepo
9-
- github_account: monolithprojects-testorg
10-
- runner_state: absent
7+
runner_user: ansible
8+
github_repo: ansible-github_actions_runner-testrepo
9+
github_account: monolithprojects-testorg
10+
runner_state: absent
1111
roles:
12-
- ansible-github_actions_runner
12+
- monolithprojects.github_actions_runner

molecule/custom_env/converge.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
gather_facts: yes
66
become: yes
77
vars:
8-
- runner_user: ansible
9-
- github_repo: ansible-github_actions_runner-testrepo
10-
- github_account: monolithprojects-testorg
11-
- runner_version: "latest"
12-
- runner_labels:
8+
runner_user: ansible
9+
github_repo: ansible-github_actions_runner-testrepo
10+
github_account: monolithprojects-testorg
11+
runner_version: "latest"
12+
runner_labels:
1313
- label1
1414
- repo-runner
15-
- custom_env: |
15+
custom_env: |
1616
# HTTPS_PROXY=YOUR_URL_HERE
1717
1818
roles:
1919
- robertdebock.epel
20-
- ansible-github_actions_runner
20+
- monolithprojects.github_actions_runner

molecule/custom_env/requirements.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22

33
roles:
4-
- role: robertdebock.epel
4+
- name: robertdebock.epel
55
version: 3.0.1

molecule/custom_env/verify.yml

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
- name: validate Repo runners
2+
- name: Validate Repo runners
33
user: ansible
44
hosts: all
55
gather_facts: yes
66
become: yes
77
vars:
8-
- runner_user: ansible
9-
- github_repo: ansible-github_actions_runner-testrepo
10-
- github_account: monolithprojects-testorg
11-
- github_api_url: "https://api.github.com"
12-
- access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
13-
- runner_name: ubuntu16-latest
8+
runner_user: ansible
9+
github_repo: ansible-github_actions_runner-testrepo
10+
github_account: monolithprojects-testorg
11+
github_api_url: "https://api.github.com"
12+
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
13+
runner_name: ubuntu16-latest
1414

1515
tasks:
1616
- name: Check currently registered runners
17-
uri:
17+
ansible.builtin.uri:
1818
url: "{{ github_api_url }}/repos/{{ github_owner | default(github_account) }}/{{ github_repo }}/actions/runners"
1919
headers:
2020
Authorization: "token {{ access_token }}"
@@ -24,23 +24,24 @@
2424
force_basic_auth: yes
2525
register: registered_runners
2626

27-
- debug:
27+
- name: Debug | var registered_runners
28+
ansible.builtin.debug:
2829
var: registered_runners.json.runners
2930

3031
- name: Check Runner
31-
assert:
32+
ansible.builtin.assert:
3233
that:
3334
- runner_name in registered_runners.json.runners|map(attribute='name')|list
3435
- registered_runners.json.runners|map(attribute='status') == ["online"]
3536
quiet: true
3637

3738
- name: Check Labels (skipped if labels are OK)
38-
fail:
39+
ansible.builtin.fail:
3940
msg: Woops some labels differ "{{ (registered_runners.json.runners.0 | json_query('labels[*].name') | difference(['self-hosted', 'Linux', 'X64', 'label1', 'repo-runner'])) }}"
4041
when: not (registered_runners.json.runners.0 | json_query('labels[*].name') | list ) == (['self-hosted', 'Linux', 'X64', 'label1', 'repo-runner'] | list)
4142

4243
- name: Check custom env file is configured
43-
lineinfile:
44+
ansible.builtin.lineinfile:
4445
dest: /opt/actions-runner/.env
4546
line: "# HTTPS_PROXY=YOUR_URL_HERE"
4647
check_mode: yes

molecule/default/cleanup.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
hosts: all
55
become: yes
66
vars:
7-
- runner_user: ansible
8-
- github_repo: ansible-github_actions_runner-testrepo
9-
- github_account: monolithprojects-testorg
10-
- runner_state: absent
11-
- runner_name: test_name
7+
runner_user: ansible
8+
github_repo: ansible-github_actions_runner-testrepo
9+
github_account: monolithprojects-testorg
10+
runner_state: absent
11+
runner_name: test_name
1212
roles:
13-
- ansible-github_actions_runner
13+
- monolithprojects.github_actions_runner

molecule/default/converge.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
gather_facts: yes
66
become: yes
77
vars:
8-
- runner_user: ansible
9-
- github_repo: ansible-github_actions_runner-testrepo
10-
- github_account: monolithprojects-testorg
11-
- runner_version: "latest"
12-
- runner_name: test_name
13-
- runner_on_ghes: yes
14-
- reinstall_runner: false
15-
- hide_sensitive_logs: no
16-
- runner_labels:
8+
runner_user: ansible
9+
github_repo: ansible-github_actions_runner-testrepo
10+
github_account: monolithprojects-testorg
11+
runner_version: "latest"
12+
runner_name: test_name
13+
runner_on_ghes: yes
14+
reinstall_runner: false
15+
hide_sensitive_logs: no
16+
runner_labels:
1717
- label1
1818
- repo-runner
1919
roles:
2020
- robertdebock.epel
21-
- ansible-github_actions_runner
21+
- monolithprojects.github_actions_runner

molecule/default/requirements.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22

33
roles:
4-
- role: robertdebock.epel
4+
- name: robertdebock.epel
55
version: 3.0.1

molecule/default/verify.yml

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
- name: validate Repo runners
2+
- name: Validate Repo runners
33
user: ansible
44
hosts: all
55
gather_facts: yes
66
become: yes
77
vars:
8-
- runner_user: ansible
9-
- github_repo: ansible-github_actions_runner-testrepo
10-
- github_account: monolithprojects-testorg
11-
- github_api_url: "https://api.github.com"
12-
- access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
13-
- runner_name: ubuntu16-latest
8+
runner_user: ansible
9+
github_repo: ansible-github_actions_runner-testrepo
10+
github_account: monolithprojects-testorg
11+
github_api_url: "https://api.github.com"
12+
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
13+
runner_name: ubuntu16-latest
1414

1515
tasks:
1616
- name: Check currently registered runners
17-
uri:
17+
ansible.builtin.uri:
1818
url: "{{ github_api_url }}/repos/{{ github_owner | default(github_account) }}/{{ github_repo }}/actions/runners"
1919
headers:
2020
Authorization: "token {{ access_token }}"
@@ -24,17 +24,18 @@
2424
force_basic_auth: yes
2525
register: registered_runners
2626

27-
- debug:
27+
- name: Debug | var registered_runners
28+
ansible.builtin.debug:
2829
var: registered_runners.json.runners
2930

3031
- name: Check Runner
31-
assert:
32+
ansible.builtin.assert:
3233
that:
3334
- runner_name in registered_runners.json.runners|map(attribute='name')|list
3435
- registered_runners.json.runners|map(attribute='status') == ["online"]
3536
quiet: true
3637

3738
- name: Check Labels (skipped if labels are OK)
38-
fail:
39+
ansible.builtin.fail:
3940
msg: Woops some labels differ "{{ (registered_runners.json.runners.0 | json_query('labels[*].name') | difference(['self-hosted', 'Linux', 'X64', 'label1', 'repo-runner'])) }}"
4041
when: not (registered_runners.json.runners.0 | json_query('labels[*].name') | list ) == (['self-hosted', 'Linux', 'X64', 'label1', 'repo-runner'] | list)

molecule/org/cleanup.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
hosts: all
55
become: yes
66
vars:
7-
- runner_user: ansible
8-
- github_account: monolithprojects-testorg
9-
- runner_org: yes
10-
- runner_state: absent
7+
runner_user: ansible
8+
github_account: monolithprojects-testorg
9+
runner_org: yes
10+
runner_state: absent
1111
roles:
12-
- ansible-github_actions_runner
12+
- monolithprojects.github_actions_runner

molecule/org/converge.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
hosts: all
55
become: yes
66
vars:
7-
- runner_user: ansible
8-
- github_account: monolithprojects-testorg
9-
- runner_org: yes
10-
- runner_state: "stopped"
11-
- runner_version: "2.303.0"
7+
runner_user: ansible
8+
github_account: monolithprojects-testorg
9+
runner_org: yes
10+
runner_state: "stopped"
11+
runner_version: "2.303.0"
1212
roles:
1313
- robertdebock.epel
14-
- ansible-github_actions_runner
14+
- monolithprojects.github_actions_runner

molecule/org/requirements.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22

33
roles:
4-
- role: robertdebock.epel
4+
- name: robertdebock.epel
55
version: 3.0.1

molecule/org/verify.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
---
2-
- name: validate Repo runners
2+
- name: Validate Repo runners
33
user: ansible
44
hosts: all
55
gather_facts: yes
66
become: yes
77
vars:
8-
- runner_user: ansible
9-
- github_account: monolithprojects-testorg
10-
- runner_org: yes
11-
- github_api_url: "https://api.github.com"
12-
- access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
13-
- runner_name: "{{ ansible_hostname }}"
8+
runner_user: ansible
9+
github_account: monolithprojects-testorg
10+
runner_org: yes
11+
github_api_url: "https://api.github.com"
12+
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
13+
runner_name: "{{ ansible_hostname }}"
1414

1515
tasks:
1616
- name: Give the runners a minute
17-
pause:
17+
ansible.builtin.pause:
1818
seconds: 30
1919

2020
- name: Check currently registered runners
21-
uri:
21+
ansible.builtin.uri:
2222
url: "{{ github_api_url }}/orgs/{{ github_owner | default(github_account) }}/actions/runners"
2323
headers:
2424
Authorization: "token {{ access_token }}"
@@ -29,7 +29,7 @@
2929
register: registered_runners
3030

3131
- name: Check Runner
32-
assert:
32+
ansible.builtin.assert:
3333
that:
3434
- runner_name in registered_runners.json.runners|map(attribute='name')|list
3535
quiet: true

molecule/repo/cleanup.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
hosts: all
55
become: yes
66
vars:
7-
- runner_user: ansible
8-
- github_repo: ansible-github_actions_runner-testrepo
9-
- github_account: monolithprojects-testorg
10-
- runner_state: absent
7+
runner_user: ansible
8+
github_repo: ansible-github_actions_runner-testrepo
9+
github_account: monolithprojects-testorg
10+
runner_state: absent
1111
roles:
12-
- ansible-github_actions_runner
12+
- monolithprojects.github_actions_runner

molecule/repo/converge.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
gather_facts: yes
66
become: yes
77
vars:
8-
- runner_user: ansible
9-
- github_repo: ansible-github_actions_runner-testrepo
10-
- github_account: monolithprojects-testorg
11-
- runner_version: "latest"
12-
- runner_labels:
8+
runner_user: ansible
9+
github_repo: ansible-github_actions_runner-testrepo
10+
github_account: monolithprojects-testorg
11+
runner_version: "latest"
12+
runner_labels:
1313
- label1
1414
- repo-runner
1515
roles:
1616
- robertdebock.epel
17-
- ansible-github_actions_runner
17+
- monolithprojects.github_actions_runner

0 commit comments

Comments
 (0)