awx.awx.tower_inventory_source – create, update, or destroy Ansible Tower inventory source.
Note
This plugin is part of the awx.awx collection (version 17.0.1).
To install it use: ansible-galaxy collection install awx.awx
.
To use it in a playbook, specify: awx.awx.tower_inventory_source
.
Synopsis
- Create, update, or destroy Ansible Tower inventory source. See https://www.ansible.com/tower for an overview.
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
credential string | Credential to use for the source. | |
custom_virtualenv string | Local absolute file path containing a custom Python virtualenv to use. | |
description string | The description to use for the inventory source. | |
enabled_value string | Value when the host is considered enabled, e.g., "powered_on" | |
enabled_var string | The variable to use to determine enabled state e.g., "status.power_state" | |
host_filter string | If specified, AWX will only import hosts that match this regular expression. | |
inventory string / required | Inventory the group should be made a member of. | |
name string / required | The name to use for the inventory source. | |
new_name string | A new name for this assets (will rename the asset) | |
notification_templates_error list / elements=string | list of notifications to send on error | |
notification_templates_started list / elements=string | list of notifications to send on start | |
notification_templates_success list / elements=string | list of notifications to send on success | |
organization string | Name of the inventory source's inventory's organization. | |
overwrite boolean |
| Delete child groups and hosts not found in source. |
overwrite_vars boolean |
| Override vars in child groups and hosts with those from external source. |
source string |
| The source to use for this group. |
source_path string | For an SCM based inventory source, the source path points to the file within the repo to use as an inventory. | |
source_project string | Project to use as source with scm option | |
source_script string | Inventory script to be used when group type is custom . | |
source_vars dictionary | The variables or environment fields to apply to this source type. | |
state string |
| Desired state of the resource. |
timeout integer | The amount of time (in seconds) to run before the task is canceled. | |
tower_config_file path | Path to the Tower or AWX config file. If provided, the other locations for config files will not be considered. | |
tower_host string | URL to your Tower or AWX instance. If value not set, will try environment variable TOWER_HOST and then config filesIf value not specified by any means, the value of 127.0.0.1 will be used | |
tower_oauthtoken raw added in 3.7 of awx.awx | The Tower 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 tower_token module. If value not set, will try environment variable TOWER_OAUTH_TOKEN and then config files | |
tower_password string | Password for your Tower or AWX instance. If value not set, will try environment variable TOWER_PASSWORD and then config files | |
tower_username string | Username for your Tower or AWX instance. If value not set, will try environment variable TOWER_USERNAME and then config files | |
update_cache_timeout integer | Time in seconds to consider an inventory sync to be current. | |
update_on_launch boolean |
| Refresh inventory data from its source each time a job is run. |
update_on_project_update boolean |
| Update this source when the related project updates if source is scm
|
validate_certs boolean |
| Whether to allow insecure connections to Tower or AWX. If 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 TOWER_VERIFY_SSL and then config filesaliases: tower_verify_ssl |
verbosity integer |
| The verbosity level to run this inventory source under. |
Notes
Note
- If no config_file is provided we will attempt to use the tower-cli library defaults to find your Tower host information.
- config_file should contain Tower configuration in the following format host=hostname username=username password=password
Examples
- 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 organization: Default source_vars: private: false
Authors
- Adrien Fleury (@fleu42)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/awx/awx/tower_inventory_source_module.html