community.general.opennebula (8.5.0) — inventory

OpenNebula inventory source

| "added in version" 3.8.0 of community.general"

Authors: Kristian Feldsam (@feldsam)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Get inventory hosts from OpenNebula cloud.

Uses an YAML configuration file ending with either C(opennebula.yml) or C(opennebula.yaml) to set parameter values.

Uses O(api_authfile), C(~/.one/one_auth), or E(ONE_AUTH) pointing to a OpenNebula credentials file.

Inputs

    
groups:
    default: {}
    description: Add hosts to group based on Jinja2 conditionals.
    type: dict

plugin:
    choices:
    - community.general.opennebula
    description: Token that ensures this is a source file for the 'opennebula' plugin.
    required: true
    type: string

strict:
    default: false
    description:
    - If V(yes) 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.
    type: bool

api_url:
    description:
    - URL of the OpenNebula RPC server.
    - It is recommended to use HTTPS so that the username/password are not transferred
      over the network unencrypted.
    - If not set then the value of the E(ONE_URL) environment variable is used.
    env:
    - name: ONE_URL
    required: true
    type: string

compose:
    default: {}
    description: Create vars from jinja2 expressions.
    type: dict

hostname:
    choices:
    - v4_first_ip
    - v6_first_ip
    - name
    default: v4_first_ip
    description: Field to match the hostname. Note V(v4_first_ip) corresponds to the first
      IPv4 found on VM.
    type: string

api_authfile:
    description:
    - If both O(api_username) or O(api_password) are not set, then it will try authenticate
      with ONE auth file. Default path is C(~/.one/one_auth).
    - Set environment variable E(ONE_AUTH) to override this path.
    env:
    - name: ONE_AUTH
    required: false
    type: string

api_password:
    description:
    - Password or a token of the user to login into OpenNebula RPC server.
    - If not set, the value of the E(ONE_PASSWORD) environment variable is used.
    env:
    - name: ONE_PASSWORD
    required: false
    type: string

api_username:
    description:
    - Name of the user to login into the OpenNebula RPC server. If not set then the value
      of the E(ONE_USERNAME) environment variable is used.
    env:
    - name: ONE_USERNAME
    type: string

keyed_groups:
    default: []
    description: Add hosts to group based on the values of a variable.
    elements: dict
    suboptions:
      default_value:
        description:
        - The default value when the host variable's value is an empty string.
        - This option is mutually exclusive with O(keyed_groups[].trailing_separator).
        type: str
        version_added: '2.12'
        version_added_collection: ansible.builtin
      key:
        description:
        - The key from input dictionary used to generate groups
        type: str
      parent_group:
        description: parent group for keyed group
        type: str
      prefix:
        default: ''
        description: A keyed group name will start with this prefix
        type: str
      separator:
        default: _
        description: separator used to build the keyed group name
        type: str
      trailing_separator:
        default: true
        description:
        - Set this option to V(False) to omit the O(keyed_groups[].separator) after the
          host variable when the value is an empty string.
        - This option is mutually exclusive with O(keyed_groups[].default_value).
        type: bool
        version_added: '2.12'
        version_added_collection: ansible.builtin
    type: list

use_extra_vars:
    default: false
    description: Merge extra vars into the available variables for composition (highest
      precedence).
    env:
    - name: ANSIBLE_INVENTORY_USE_EXTRA_VARS
    ini:
    - key: use_extra_vars
      section: inventory_plugins
    type: bool
    version_added: '2.11'
    version_added_collection: ansible.builtin

filter_by_label:
    description: Only return servers filtered by this label.
    type: string

group_by_labels:
    default: true
    description: Create host groups by vm labels
    type: bool

leading_separator:
    default: true
    description:
    - Use in conjunction with keyed_groups.
    - By default, a keyed group that does not have a prefix or a separator provided will
      have a name that starts with an underscore.
    - This is because the default prefix is "" and the default separator is "_".
    - Set this option to False to omit the leading underscore (or other separator) if
      no prefix is given.
    - If the group name is derived from a mapping the separator is still used to concatenate
      the items.
    - To not use a separator in the group name at all, set the separator for the keyed
      group to an empty string instead.
    type: boolean
    version_added: '2.11'
    version_added_collection: ansible.builtin