Skip to content

Commit 658dc73

Browse files
committed
Ensure that the ansible_facts.services dictionary returns a value if the runner service key is missing.
1 parent 1662b29 commit 658dc73

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
@@ -129,7 +129,7 @@
129129
when: >
130130
ansible_facts.system != 'Darwin' and
131131
runner_state|lower == "started" and
132-
ansible_facts.services[(runner_service.content | b64decode) | trim ]['state'] != 'running'
132+
ansible_facts.services[(runner_service.content | b64decode) | trim ]['state'] | default('stopped') != 'running'
133133
134134
- name: START and enable Github Actions Runner service (macOS) # TODO: Idempotence
135135
ansible.builtin.command: "./svc.sh start" # noqa no-changed-when

0 commit comments

Comments
 (0)