fr33jc / bang

The beginning of the universe...
GNU General Public License v3.0
22 stars 7 forks source link

bang --list includes load balancer instances in HPCS (and OpenStack?) #8

Closed pgcorchary closed 10 years ago

pgcorchary commented 11 years ago

In HPCS use of bang, I see that # bang --list returns load balancer instances. I feel this form should include only server/compute instances. Maybe an option for each form?

fr33jc commented 10 years ago

The bang --list command is specifically made to be useful as an ansible inventory plugin. It is a pretty common use case to require load balancer attributes within an ansible playbook, so these hosts need to be in there. Is there a specific reason to filter ther load balancers out?

sjmc7 commented 10 years ago

The specific issue in this case I think arose when a playbook applies to all groups (ansible has wildcards all and ungrouped that can be used as the hosts argument to a playbook). Since the load balancer addresses appear as part of this list (but can't be acted upon as servers) this causes issues. There is a workaround i think to use something like all:!*_lb (at least from the ansible command line, but i believe this would work inside a playbook).

In general though they are required in the inventory for the reasons outlined above.

pgcorchary commented 10 years ago

sjmc7 - That is a correct summary. I'll try that in ansible.

fr33jc commented 10 years ago

I just tested this and ansible's pattern negation works as described above so I'm closing this issue.