Skip to content
Snippets Groups Projects
Verified Commit cc026d10 authored by Chris Croome's avatar Chris Croome
Browse files

test fix start service

parent c24a4ab6
No related branches found
No related tags found
No related merge requests found
Pipeline #33591 failed
......@@ -147,6 +147,14 @@
vars:
systemd_service_jpq: 'ansible_facts.services.["{{ systemd_unit.name }}.service"]|[0]'
- name: Systemd daemon-reload when the service is not running
ansible.builtin.systemd_service:
daemon_reload: true
vars:
systemd_service_jpq: 'ansible_facts.services.["{{ systemd_unit.name }}.service"]|[0]'
changed_when: true
when: (systemd_service_facts | community.general.json_query(systemd_service_jpq)).state != "running"
- name: Start the service using the command module if it is not running
ansible.builtin.command: "service {{ systemd_unit.name }} start"
vars:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment