diff --git a/molecule/custom_env/cleanup.yml b/molecule/custom_env/cleanup.yml index 8969cf2..34bc208 100644 --- a/molecule/custom_env/cleanup.yml +++ b/molecule/custom_env/cleanup.yml @@ -8,5 +8,6 @@ github_repo: "{{ lookup('env', 'GITHUB_REPO') }}" github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}" runner_state: absent + runner_name: test_name roles: - monolithprojects.github_actions_runner diff --git a/molecule/custom_env/converge.yml b/molecule/custom_env/converge.yml index 3d9afd0..bd8f486 100644 --- a/molecule/custom_env/converge.yml +++ b/molecule/custom_env/converge.yml @@ -9,6 +9,7 @@ github_repo: "{{ lookup('env', 'GITHUB_REPO') }}" github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}" runner_version: "latest" + runner_name: test_name runner_labels: - label1 - repo-runner diff --git a/molecule/custom_env/verify.yml b/molecule/custom_env/verify.yml index 95b8028..cba84e6 100644 --- a/molecule/custom_env/verify.yml +++ b/molecule/custom_env/verify.yml @@ -10,7 +10,7 @@ github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}" github_api_url: "https://api.github.com" access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}" - runner_name: ubuntu16-latest + runner_name: test_name tasks: - name: Check currently registered runners @@ -32,7 +32,7 @@ ansible.builtin.assert: that: - runner_name in registered_runners.json.runners|map(attribute='name')|list - - registered_runners.json.runners|map(attribute='status') == ["online"] + - registered_runners.json.runners.0.status == "online" quiet: true - name: Check Labels (skipped if labels are OK) diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml index dd95a09..a987064 100644 --- a/molecule/default/verify.yml +++ b/molecule/default/verify.yml @@ -10,7 +10,7 @@ github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}" github_api_url: "https://api.github.com" access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}" - runner_name: ubuntu16-latest + runner_name: test_name tasks: - name: Check currently registered runners @@ -31,6 +31,7 @@ - name: Check Runner ansible.builtin.assert: that: + - runner_name in registered_runners.json.runners|map(attribute='name')|list - registered_runners.json.runners.0.status == "online" quiet: true