Skip to content

Commit

Permalink
Ensure that the ansible_facts.services dictionary returns a value if …
Browse files Browse the repository at this point in the history
…the runner service key is missing.
  • Loading branch information
bschonec committed Apr 22, 2024
1 parent 1662b29 commit 658dc73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/install_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
when: >
ansible_facts.system != 'Darwin' and
runner_state|lower == "started" and
ansible_facts.services[(runner_service.content | b64decode) | trim ]['state'] != 'running'
ansible_facts.services[(runner_service.content | b64decode) | trim ]['state'] | default('stopped') != 'running'
- name: START and enable Github Actions Runner service (macOS) # TODO: Idempotence
ansible.builtin.command: "./svc.sh start" # noqa no-changed-when
Expand Down

0 comments on commit 658dc73

Please sign in to comment.