You can pick only one host as below example. [webservers] A B C
You can just pick host A by using hosts: groups[‘webservers’][0] In your playbook. On Mon, Mar 25, 2019 at 9:17 PM <[email protected]> wrote: > Hello, > I just starte to use ansible, now there is a question , when > during the batch execution of the playbook, some operations are performed > only on one of the hosts. How do you avoid other hosts on a piaybook while > performing these operations? > For example,: > I will perform batch execution operations on three > hosts, A,B and C, and some of them will only be executed in A. How to do > this > > -- > 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 post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/19bfdfae-aa89-4959-af94-c71ce660c05c%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/19bfdfae-aa89-4959-af94-c71ce660c05c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Shankar Pentyala [email protected] (916) 755 - 9527 https://www.linkedin.com/in/codinghumble/ -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAKLj9CKO95DJmFenAxj6PiZb_b08pr%3D13D4ATXEH_nPioWfRbg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
