Skip to content

Commit 588671f

Browse files
Merge pull request #202 from bschonec/default_ansible_facts_service_key
Ensure that the ansible_facts.services dictionary returns a value. Fixes #201
2 parents a5e9318 + 658dc73 commit 588671f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks/install_runner.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
when: >
131131
ansible_facts.system != 'Darwin' and
132132
runner_state|lower == "started" and
133-
ansible_facts.services[(runner_service.content | b64decode) | trim ]['state'] != 'running'
133+
ansible_facts.services[(runner_service.content | b64decode) | trim ]['state'] | default('stopped') != 'running'
134134
135135
- name: START and enable Github Actions Runner service (macOS) # TODO: Idempotence
136136
ansible.builtin.command: "./svc.sh start" # noqa no-changed-when

0 commit comments

Comments
 (0)