---
- name: Restart the FedEx service
hosts: Windows1
tasks:
- name: Restart the service
win_service:
name: fedex
state: restarted
- name: Pause for 1 minute
pause:
minutes: 1
when: inventory_hostname != groups['Windows1'][-1]
On Monday, June 5, 2023 at 6:45:49 AM UTC-7 Amit Kulkarni wrote:
> Hello All,
>
> I wanted to restart 1 windows service on 2 hosts 1 min apart, is there any
> way we can achieve this.
> Here is the my playbook Let me know in case of anything
>
> ---
> - name: restart the fedex service
> hosts: Windows1
> tasks:
> - win_service:
> name: fedex
> state: restarted
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/651169f4-6463-4652-866d-0641b48a3ac2n%40googlegroups.com.