alancoding.awx.tower_inventory_source (11.2.0) — module

create, update, or destroy Ansible Tower inventory source.

| "added in version" 2.7 of alancoding.awx"

Authors: Adrien Fleury (@fleu42)

preview | supported by community

Install collection

Install with ansible-galaxy collection install alancoding.awx:==11.2.0


Add to requirements.yml

  collections:
    - name: alancoding.awx
      version: 11.2.0

Description

Create, update, or destroy Ansible Tower 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
  tower_inventory_source:
    name: "source-inventory"
    description: Source for inventory
    inventory: previously-created-inventory
    credential: previously-created-credential
    overwrite: True
    update_on_launch: True
    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
    - cloudforms
    - openstack
    - rhv
    - tower
    - custom
    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

group_by:
    description:
    - Limit groups automatically created from inventory source.
    type: str

new_name:
    description:
    - A new name for this assets (will rename the asset)
    type: str
    version_added: '3.7'
    version_added_collection: alancoding.awx

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

overwrite:
    default: 'no'
    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

tower_host:
    description:
    - URL to your Tower or AWX instance.
    - If value not set, will try environment variable C(TOWER_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

description:
    description:
    - The description to use for the inventory source.
    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

source_script:
    description:
    - Inventory script to be used when group type is C(custom).
    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

source_regions:
    description:
    - Regions for cloud provider.
    type: str

tower_password:
    description:
    - Password for your Tower or AWX instance.
    - If value not set, will try environment variable C(TOWER_PASSWORD) and then config
      files
    type: str

tower_username:
    description:
    - Username for your Tower or AWX instance.
    - If value not set, will try environment variable C(TOWER_USERNAME) and then config
      files
    type: str

validate_certs:
    aliases:
    - tower_verify_ssl
    description:
    - Whether to allow insecure connections to Tower or 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(TOWER_VERIFY_SSL) and then config
      files
    type: bool

instance_filters:
    description:
    - Comma-separated list of filter expressions for matching hosts.
    type: str

tower_oauthtoken:
    description:
    - The Tower OAuth token to use.
    - If value not set, will try environment variable C(TOWER_OAUTH_TOKEN) and then config
      files
    type: str
    version_added: '3.7'
    version_added_collection: alancoding.awx

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

custom_virtualenv:
    default: ''
    description:
    - Local absolute file path containing a custom Python virtualenv to use.
    type: str
    version_added: '2.9'
    version_added_collection: alancoding.awx

tower_config_file:
    description:
    - Path to the Tower or AWX config file.
    type: path

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

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