Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'digital_ocean' as group in DigitalOcean dynamic inventory #21631

Merged
merged 1 commit into from
Feb 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion contrib/inventory/digital_ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
The following groups are generated from --list:
- ID (droplet ID)
- NAME (droplet NAME)
- digital_ocean
- image_ID
- image_NAME
- distro_NAME (distribution NAME from image)
Expand Down Expand Up @@ -378,7 +379,8 @@ def build_inventory(self):
self.inventory[droplet['name']] = [dest]

# groups that are always present
for group in ('region_' + droplet['region']['slug'],
for group in ('digital_ocean',
'region_' + droplet['region']['slug'],
'image_' + str(droplet['image']['id']),
'size_' + droplet['size']['slug'],
'distro_' + self.to_safe(droplet['image']['distribution']),
Expand Down