community.general.virtualbox – virtualbox inventory source¶
Note
This plugin is part of the community.general collection (version 2.5.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.virtualbox
.
Synopsis¶
Get inventory hosts from the local virtualbox installation.
Uses a YAML configuration file that ends with virtualbox.(yml|yaml) or vbox.(yml|yaml).
The inventory_hostname is always the ‘Name’ of the virtualbox instance.
Parameters¶
Examples¶
# file must be named vbox.yaml or vbox.yml
simple_config_file:
plugin: community.general.virtualbox
settings_password_file: /etc/virtulbox/secrets
query:
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: community.general.virtualbox
groups:
container: "'minis' in (inventory_hostname)"
Authors¶
Unknown (!UNKNOWN)