Documentation

virtualbox - virtualbox inventory source

Synopsis

  • Get inventory hosts from the local virtualbox installation.
  • Uses a <name>.vbox.yaml (or .vbox.yml) YAML configuration file.
  • The inventory_hostname is always the ‘Name’ of the virtualbox instance.

Options

parameter
required
default
choices
configuration
comments
compose
no
create vars from jinja2 expressions
settings_password_file
no
provide a file containing the settings password (equivalent to --settingspwfile)
network_info_path
no
/VirtualBox/GuestInfo/Net/0/V4/IP
property path to query for network information (ansible_host)
strict
no
If true make invalid entries a fatal error, otherwise skip and continue
Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.
keyed_groups
no
add hosts to group based on the values of a variable
groups
no
add hosts to group based on Jinja2 conditionals
query
no
create vars from virtualbox properties
running_only
no
toggles showing all vms vs only those currently running

Examples

# file must be named vbox.yaml or vbox.yml
simple_config_file:
    plugin: 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')

Author

  • UNKNOWN

If you want to help with development, please read Community Information & Contributing, Testing Ansible and Developing Plugins.