Hello Magnus, We need to use dynamic hosts with when condition. Here we are calling the hosts with tag names. Could please me in this condition.
Best regards, Jayanth On Tue, Feb 15, 2022, 8:47 PM jayanth reddy <reddyjayant...@gmail.com> wrote: > Hello Magnus, > > Thanks for the tip! > > Best Regards, > Jayanth > > On Tue, Feb 15, 2022, 1:19 PM Magnus Lubeck <magnus.lub...@gmail.com> > wrote: > >> You can simply do it by having multiple plays in one playbook. Many ways >> to skin this cat. >> >> ``` >> --- >> - name: reboot server 1 >> hosts: server1 >> tasks: >> - reboot >> - name: reboot the rest >> hosts: zoneA, !server1 >> tasks: >> - reboot >> ``` >> >> Sent from my iPhone >> >> On 15 Feb 2022, at 07:13, jayanth reddy <reddyjayant...@gmail.com> wrote: >> >> >> Hi Team, >> >> I have multiple servers in one region and seperated with zone a &b >> >> I need to reboot one system in zone a and once it come back i need to >> reboot rest of the systeme in zone a. >> Can you help with condition to write a ansible play for this. >> Thanks in advance >> >> Best regards, >> Jayanth >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Development" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to ansible-devel+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-devel/CAKEUuo5HWBt3vU0OBPVWyqTOB8z9KgxBjN4R%2B2ZgQUCeQsQ-RQ%40mail.gmail.com >> <https://groups.google.com/d/msgid/ansible-devel/CAKEUuo5HWBt3vU0OBPVWyqTOB8z9KgxBjN4R%2B2ZgQUCeQsQ-RQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/CAKEUuo777pjrddm%2Ba7rEOdZYQFjeTq2x-Hj9hGdmXL%2B5Jwb2rA%40mail.gmail.com.