Do you need to do this randomly and then remember which ones were randomly chosen? Or could you just, say, work with the first X in a group? If the latter, you might be able to do something like this (untested) to do the first 3 servers in a specific_group:
hosts: specific_group[0]:specific_group[1]:specific_group[2] roles: - foo You could also try creating a new sub-group in your inventory that is comprised of something like the above. Again, not sure if that would work. On Mon, Sep 29, 2014 at 5:16 AM, <[email protected]> wrote: > Hi, > > I want to install specific role on part of the hosts in a host group. Not a > rolling update, but as an absolute limit of some process installation in > entire host group. > So, according to that number process will be installed or removed from > instance to adjust. > > How can i implement this? > > Regards, > Leonid > > -- > 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/fe9cb596-a005-4221-8817-b1598f9b6763%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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/CAJQqANduv2aNMduCmPhmc3g%3DPg%2B-MA01xRX-mKHqicqa7OegGg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
