简体   繁体   中英

How can I add/remove instances from GCE load balancers with Ansible?

I see that there is a gce_lb Ansible module, but it is unclear to me whether or not I can actually use this to change the instances assigned to that LB or whether the module just creates and destroys LBs.

In contrast, EC2 clearly has one module just for creating and destroying ELBs, and another module explicitly for [de]registering instances to/from an existing ELB.

Currently, the gce_lb module is only for creating/destroying the LB. It does not support adding/removing instances.

The GCE modules in Ansible are built on top of the python libcloud library which does have support for add/remove. I think a similar approach taken by the EC2 modules would be a good solution here also.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM