Skip to content

Commit 526a863

Browse files
Merge pull request #4 from MonolithProjects/develop
Fix ansible lints Former-commit-id: b25475f
2 parents 5fc33c1 + f052748 commit 526a863

File tree

4 files changed

+10
-19
lines changed

4 files changed

+10
-19
lines changed

molecule/default/converge.yml

-13
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,6 @@
33
user: ansible
44
hosts: all
55
become: yes
6-
vars:
7-
- runner_user: ansible
8-
- github_repo: ansible-github_actions_runner-testrepo
9-
- github_account: monolithprojects
10-
roles:
11-
- role: ansible-github_actions_runner
12-
13-
- name: Uninstall
14-
user: ansible
15-
hosts: all
16-
become: yes
17-
tags:
18-
- uninstall
196
vars:
207
- runner_user: ansible
218
- github_repo: ansible-github_actions_runner-testrepo

molecule/default/molecule.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ platforms:
4646
# pre_build_image: yes
4747
provisioner:
4848
name: ansible
49+
playbooks:
50+
converge: converge.yml
51+
cleanup: cleanup.yml
4952
log: false
50-
# env:
51-
# PERSONAL_ACCESS_TOKEN: $PERSONAL_ACCESS_TOKEN
5253
inventory:
5354
host_vars:
5455
CentOS8:

tasks/install_runner.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,23 @@
3030
- install
3131

3232
- name: Register runner
33-
command: "{{ runner_dir }}/./config.sh --url {{ github_server }}/{{ github_account }}/{{ github_repo }} --token {{ registration.json.token }} --unattended"
33+
command: "{{ runner_dir }}/./config.sh --url {{ github_server }}/{{ github_account }}/{{ github_repo }} \
34+
--token {{ registration.json.token }} --unattended"
3435
args:
3536
chdir: "{{ runner_dir }}"
36-
# became: yes
37+
become: yes
3738
become_user: "{{ runner_user }}"
3839
no_log: "{{ hide_sensitive_logs }}"
3940
when: ansible_hostname not in registered_runners.json.runners|map(attribute='name')|list
4041
tags:
4142
- install
4243

4344
- name: Replace registered runner
44-
command: "{{ runner_dir }}/config.sh --url {{ github_server }}/{{ github_account }}/{{ github_repo }} --token {{ registration.json.token }} --unattended --replace"
45+
command: "{{ runner_dir }}/config.sh --url {{ github_server }}/{{ github_account }}/{{ github_repo }} \
46+
--token {{ registration.json.token }} --unattended --replace"
4547
args:
4648
chdir: "{{ runner_dir }}"
47-
# became: yes
49+
become: yes
4850
become_user: "{{ runner_user }}"
4951
no_log: "{{ hide_sensitive_logs }}"
5052
when: replace_runner and ansible_hostname in registered_runners.json.runners|map(attribute='name')|list

tasks/uninstall_runner.yml

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
command: "./config.sh remove --token {{ registration.json.token }} --unattended"
3636
args:
3737
chdir: "{{ runner_dir }}"
38+
become: yes
3839
become_user: "{{ runner_user }}"
3940
no_log: "{{ hide_sensitive_logs }}"
4041
when: ansible_hostname in registered_runners.json.runners|map(attribute='name')|list and runner_file.stat.exists

0 commit comments

Comments
 (0)