Skip to content

Commit 58c1e69

Browse files
Merge pull request #46 from MonolithProjects/develop
Installation idempotence fix
2 parents d57934c + ba694bd commit 58c1e69

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ on:
1111
schedule:
1212
- cron: '0 6 * * 0'
1313
jobs:
14-
test:
14+
repo:
15+
name: Test Repo Runner
1516
runs-on: ubuntu-18.04
1617
strategy:
1718
fail-fast: true
@@ -26,6 +27,16 @@ jobs:
2627
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
2728
with:
2829
molecule_command: test
30+
org:
31+
name: Test Org Runner
32+
runs-on: ubuntu-18.04
33+
strategy:
34+
fail-fast: true
35+
steps:
36+
- name: checkout
37+
uses: actions/checkout@v2
38+
with:
39+
path: "${{ github.repository }}"
2940
- name: Molecule for Ansible - GHR Organization
3041
uses: MonolithProjects/[email protected]
3142
env:

molecule/default/converge.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@
1212
- robertdebock.epel
1313
- ansible-github_actions_runner
1414

15-
- name: Reinstall
15+
- name: Idempotence test
1616
user: ansible
1717
hosts: all
1818
become: yes
1919
vars:
2020
- runner_user: ansible
2121
- github_repo: ansible-github_actions_runner-testrepo
2222
- github_account: monolithprojects
23-
- reinstall_runner: yes
2423
- runner_version: "latest"
2524
roles:
2625
- robertdebock.epel

molecule/organization/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- github_account: monolithprojects-testorg
99
- runner_org: yes
1010
- runner_state: "stopped"
11-
- runner_version: "2.274.1"
11+
- runner_version: "2.274.2"
1212
roles:
1313
- robertdebock.epel
1414
- ansible-github_actions_runner

tasks/install_runner.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
become: yes
110110
become_user: "{{ runner_user }}"
111111
no_log: "{{ hide_sensitive_logs | bool }}"
112-
when: runner_name in registered_runners.json.runners|map(attribute='name')|list and not runner_org
112+
when: runner_name in registered_runners.json.runners|map(attribute='name')|list and reinstall_runner and not runner_org
113113
tags:
114114
- install
115115

@@ -121,7 +121,7 @@
121121
become: yes
122122
become_user: "{{ runner_user }}"
123123
no_log: "{{ hide_sensitive_logs | bool }}"
124-
when: runner_name in registered_runners.json.runners|map(attribute='name')|list and runner_org
124+
when: runner_name in registered_runners.json.runners|map(attribute='name')|list and reinstall_runner and runner_org
125125
tags:
126126
- install
127127

0 commit comments

Comments
 (0)