mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
add tag grouping
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
d24bf49d3f
commit
b35d4d7a19
1 changed files with 5 additions and 0 deletions
|
@ -401,6 +401,11 @@ or environment variables (DO_API_TOKEN)\n''')
|
|||
self.inventory[image] = { 'hosts': [ ], 'vars': {} }
|
||||
self.inventory[image]['hosts'].append(dest)
|
||||
|
||||
if droplet['tags']:
|
||||
for tag in droplet['tags']:
|
||||
if tag not in self.inventory:
|
||||
self.inventory[tag] = { 'hosts': [ ], 'vars': {} }
|
||||
self.inventory[tag]['hosts'].append(dest)
|
||||
|
||||
|
||||
def load_droplet_variables_for_host(self):
|
||||
|
|
Loading…
Reference in a new issue