Quantcast
Channel: sleeplessbeastie's notes
Viewing all articles
Browse latest Browse all 770

How to wait until service is running inside ansible playbook

$
0
0
Wait until service is stopped or running inside ansible playbook. Sample playbook to visualize the solution. --- - hosts: localhost vars: local__service: ssh tasks: - block: - name: "Stop {{ local__service }} service" systemd: service: "{{ local__service }}" state: stopped - name: "Populate ansible_facts.services variable" ansible.builtin.service_facts: - name: "{{ local__service }} state will be stopped […]

Viewing all articles
Browse latest Browse all 770

Trending Articles