mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Remove grouping of hosts by trying to discern subdom in server name
This commit is contained in:
parent
7c88ac0a5e
commit
d59f9b4289
1 changed files with 0 additions and 10 deletions
|
@ -141,16 +141,6 @@ def _list(region):
|
||||||
# Create a group on region
|
# Create a group on region
|
||||||
groups[region].append(server.name)
|
groups[region].append(server.name)
|
||||||
|
|
||||||
# Anything we can discern from the hostname?
|
|
||||||
try:
|
|
||||||
subdom = server.name.split('.')[0]
|
|
||||||
except IndexError:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
for name in ('web', 'db', 'sql', 'lb', 'app'):
|
|
||||||
if name in subdom:
|
|
||||||
groups[name].append(server.name)
|
|
||||||
|
|
||||||
# Check if group metadata key in servers' metadata
|
# Check if group metadata key in servers' metadata
|
||||||
try:
|
try:
|
||||||
group = server.metadata['group']
|
group = server.metadata['group']
|
||||||
|
|
Loading…
Add table
Reference in a new issue