From 96d2dd32411b0e91c545c0b2b428838dd0b99e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevyn=20P=C3=A9rez?= Date: Wed, 22 May 2019 13:50:14 -0600 Subject: [PATCH] Adding example for add host to groups (#56756) updates the documentation for the virtualbox plugin --- lib/ansible/plugins/inventory/virtualbox.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ansible/plugins/inventory/virtualbox.py b/lib/ansible/plugins/inventory/virtualbox.py index 816252d457..16ed7962dc 100644 --- a/lib/ansible/plugins/inventory/virtualbox.py +++ b/lib/ansible/plugins/inventory/virtualbox.py @@ -44,6 +44,11 @@ simple_config_file: logged_in_users: /VirtualBox/GuestInfo/OS/LoggedInUsersList compose: ansible_connection: ('indows' in vbox_Guest_OS)|ternary('winrm', 'ssh') + +# add hosts (all match with minishift vm) to the group container if any of the vms are in ansible_inventory' +plugin: virtualbox +groups: + container: "'minis' in (inventory_hostname)" ''' import os