shanemcd.awx.inventory_source (20.0.14) — module

create, update, or destroy Automation Platform Controller inventory source.

Authors: Adrien Fleury (@fleu42)

preview | supported by community

Install collection

Install with ansible-galaxy collection install shanemcd.awx:==20.0.14


Add to requirements.yml

  collections:
    - name: shanemcd.awx
      version: 20.0.14

Description

Create, update, or destroy Automation Platform Controller inventory source. See U(https://www.ansible.com/tower) for an overview.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add an inventory source
  inventory_source:
    name: "source-inventory"
    description: Source for inventory
    inventory: previously-created-inventory
    credential: previously-created-credential
    overwrite: True
    update_on_launch: True
    organization: Default
    source_vars:
      private: false

Inputs

    
name:
    description:
    - The name to use for the inventory source.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Desired state of the resource.
    type: str

source:
    choices:
    - scm
    - ec2
    - gce
    - azure_rm
    - vmware
    - satellite6
    - openstack
    - rhv
    - controller
    - insights
    description:
    - The source to use for this group.
    type: str

timeout:
    description: The amount of time (in seconds) to run before the task is canceled.
    type: int

new_name:
    description:
    - A new name for this assets (will rename the asset)
    type: str

inventory:
    description:
    - Inventory the group should be made a member of.
    required: true
    type: str

overwrite:
    description:
    - Delete child groups and hosts not found in source.
    type: bool

verbosity:
    choices:
    - 0
    - 1
    - 2
    description: The verbosity level to run this inventory source under.
    type: int

credential:
    description:
    - Credential to use for the source.
    type: str

description:
    description:
    - The description to use for the inventory source.
    type: str

enabled_var:
    description:
    - The variable to use to determine enabled state e.g., "status.power_state"
    type: str

host_filter:
    description:
    - If specified, AWX will only import hosts that match this regular expression.
    type: str

source_path:
    description:
    - For an SCM based inventory source, the source path points to the file within the
      repo to use as an inventory.
    type: str

source_vars:
    description:
    - The variables or environment fields to apply to this source type.
    type: dict

organization:
    description:
    - Name of the inventory source's inventory's organization.
    type: str

enabled_value:
    description:
    - Value when the host is considered enabled, e.g., "powered_on"
    type: str

overwrite_vars:
    description:
    - Override vars in child groups and hosts with those from external source.
    type: bool

source_project:
    description:
    - Project to use as source with scm option
    type: str

validate_certs:
    aliases:
    - tower_verify_ssl
    description:
    - Whether to allow insecure connections to AWX.
    - If C(no), SSL certificates will not be validated.
    - This should only be used on personally controlled sites using self-signed certificates.
    - If value not set, will try environment variable C(CONTROLLER_VERIFY_SSL) and then
      config files
    type: bool

controller_host:
    aliases:
    - tower_host
    description:
    - URL to your Automation Platform Controller instance.
    - If value not set, will try environment variable C(CONTROLLER_HOST) and then config
      files
    - If value not specified by any means, the value of C(127.0.0.1) will be used
    type: str

update_on_launch:
    description:
    - Refresh inventory data from its source each time a job is run.
    type: bool

custom_virtualenv:
    description:
    - Local absolute file path containing a custom Python virtualenv to use.
    - Only compatible with older versions of AWX/Controller
    - Deprecated, will be removed in the future
    type: str

controller_password:
    aliases:
    - tower_password
    description:
    - Password for your controller instance.
    - If value not set, will try environment variable C(CONTROLLER_PASSWORD) and then
      config files
    type: str

controller_username:
    aliases:
    - tower_username
    description:
    - Username for your controller instance.
    - If value not set, will try environment variable C(CONTROLLER_USERNAME) and then
      config files
    type: str

update_cache_timeout:
    description:
    - Time in seconds to consider an inventory sync to be current.
    type: int

controller_oauthtoken:
    aliases:
    - tower_oauthtoken
    description:
    - The OAuth token to use.
    - This value can be in one of two formats.
    - A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX)
    - A dictionary structure as returned by the token module.
    - If value not set, will try environment variable C(CONTROLLER_OAUTH_TOKEN) and then
      config files
    type: raw
    version_added: 3.7.0
    version_added_collection: shanemcd.awx

execution_environment:
    description:
    - Execution Environment to use for the source.
    type: str

controller_config_file:
    aliases:
    - tower_config_file
    description:
    - Path to the controller config file.
    - If provided, the other locations for config files will not be considered.
    type: path

update_on_project_update:
    description: Update this source when the related project updates if source is C(scm)
    type: bool

notification_templates_error:
    description:
    - list of notifications to send on error
    elements: str
    type: list

notification_templates_started:
    description:
    - list of notifications to send on start
    elements: str
    type: list

notification_templates_success:
    description:
    - list of notifications to send on success
    elements: str
    type: list