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 ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
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.

Search Discussions

  • Michael Peters at Sep 29, 2014 at 2:09 pm
    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, 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 ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    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 ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    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.
  • Michael DeHaan at Sep 30, 2014 at 7:14 pm
    A nice way to express the above might be to use group ranges:

    - hosts: specific_group[0:5]

    Though often this is controlled by tags. Say, for instance, you are on EC2
    and use the "ec2" module with the "exact_count" parameter to set the number
    of images with the "webserver" tag to 25 instances.

    Then, using the ec2 dynamic inventory, talk to all machines with that tag:

    - hosts: ec2_tag_webserver
       roles:
         - ...

    That may provide an alternative way of dealing with things if it's
    applicable.



    On Mon, Sep 29, 2014 at 10:09 AM, Michael Peters wrote:

    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, 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 ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    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 ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    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.
    --
    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 ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwXKueBPTW-hRhqsm2nOxLZ113MdGKHxwqo-RVTwwN%3DBA%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Michael Peters at Sep 30, 2014 at 7:33 pm

    On Tue, Sep 30, 2014 at 3:14 PM, Michael DeHaan wrote:
    A nice way to express the above might be to use group ranges:

    - hosts: specific_group[0:5]
    Nice, I wasn't aware of this syntax. I've used the longer form when
    doing something like setting up an elasticsearch cluster where the
    first 3 nodes were set as master, non-data nodes. This is definitely
    cleaner and easier to extend if I need to add more master nodes.

    --
    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 ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJQqANdHLr5oS2n6SYhTjTQgBsvYzTVm2cS59cbCgOpabv34hw%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupansible-project @
postedSep 29, '14 at 12:27p
activeSep 30, '14 at 7:33p
posts4
users3

People

Translate

site design / logo © 2022 Grokbase