mostly includes renaming non-syntax references to tower

This commit is contained in:
Seth Foster 2021-05-03 17:20:24 -04:00
parent 9f4172ce7b
commit 82c5803e59
No known key found for this signature in database
GPG Key ID: 86E90D96F7184028
92 changed files with 410 additions and 408 deletions

View File

@ -7,9 +7,9 @@ When trying to fix a bug, it is best to replicate its behavior within a test wit
## Unit Tests
The unit tests are stored in the `test/awx` directory and, where possible, test interactions between the collections modules and the AWX database. This is achieved by using a Python testing suite and having a mocked layer which emulates interactions with the Tower API. You do not need a server to run these unit tests. The depth of testing is not fixed and can change from module to module.
The unit tests are stored in the `test/awx` directory and, where possible, test interactions between the collections modules and the AWX database. This is achieved by using a Python testing suite and having a mocked layer which emulates interactions with the API. You do not need a server to run these unit tests. The depth of testing is not fixed and can change from module to module.
Let's take a closer look at the `test_token.py` file (which tests the `tower_token` module):
Let's take a closer look at the `test_token.py` file (which tests the `token` module):
```
from __future__ import (absolute_import, division, print_function)
@ -43,7 +43,7 @@ def test_create_token(run_module, admin_user):
assert tokens[0].scope == 'read', 'Token was not given read access'
```
This test has a single test called `test_create_token`. It creates a `module_args` section which is what will be passed into our module. We then call `run_module`, asking it to run the `tower_token` module with the `module_args` we created and give us back the results. After that, we run an assertion to validate that our module did in fact report a change to the system. We will then use Python objects to look up the token that has a description of `barfoo` (which was in our arguments to the module). We want to validate that we only got back one token (the one we created) and that the scope of the token we created was read.
This test has a single test called `test_create_token`. It creates a `module_args` section which is what will be passed into our module. We then call `run_module`, asking it to run the `token` module with the `module_args` we created and give us back the results. After that, we run an assertion to validate that our module did in fact report a change to the system. We will then use Python objects to look up the token that has a description of `barfoo` (which was in our arguments to the module). We want to validate that we only got back one token (the one we created) and that the scope of the token we created was read.
### Completion Test
@ -70,7 +70,7 @@ Inside the `/tests` directory, there are two folders:
In the `/sanity` folder are file directives for specific Ansible versions which contain information about which tests to skip for specific files. There are a number of reasons you may need to skip a sanity test. See the [`ansible-test` documentation](https://docs.ansible.com/ansible/latest/dev_guide/testing_running_locally.html) for more details about how and why you might want to skip a test.
In the `integration/targets` folder you will see directories (which act as roles) for all of the different modules and plugins. When the collection is tested, an instance of Ansible Tower (or AWX) will be spun up and these roles will be applied to the target server to validate the functionality of the modules. Since these are really roles, each directory will contain a tasks folder under it with a `main.yml` file as an entry point.
In the `integration/targets` folder you will see directories (which act as roles) for all of the different modules and plugins. When the collection is tested, an instance of Automation Platform Controller (or AWX) will be spun up and these roles will be applied to the target server to validate the functionality of the modules. Since these are really roles, each directory will contain a tasks folder under it with a `main.yml` file as an entry point.
While not strictly followed, the general flow of a test should be:
@ -87,16 +87,16 @@ While not strictly followed, the general flow of a test should be:
```
- name: Generate names
set_fact:
group_name1: "AWX-Collection-tests-tower_instance_group-group1-{{ test_id }}"
group_name2: "AWX-Collection-tests-tower_instance_group-group2-{{ test_id }}"
cred_name1: "AWX-Collection-tests-tower_instance_group-cred1-{{ test_id }}"
group_name1: "AWX-Collection-tests-instance_group-group1-{{ test_id }}"
group_name2: "AWX-Collection-tests-instance_group-group2-{{ test_id }}"
cred_name1: "AWX-Collection-tests-instance_group-cred1-{{ test_id }}"
```
- **Non-creating tests (i.e. test for specific error conditions, etc), with assertion**
```
- name: Try to use a token as a dict which is missing the token parameter
tower_job_list:
job_list:
tower_oauthtoken:
not_token: "This has no token entry"
register: results
@ -112,7 +112,7 @@ While not strictly followed, the general flow of a test should be:
- Run test which creates/modifies/deletes object(s)
```
- name: Create a container group
tower_instance_group:
instance_group:
name: "{{ group_name2 }}"
credential: "{{ cred_result.id }}"
register: result
@ -135,7 +135,7 @@ While not strictly followed, the general flow of a test should be:
```
- Assert cleanup worked properly (if needed)
When writing an integration test, a test of asset type A does not need to make assertions for asset type B. For example, if you are writing an integration test for a credential and you create a custom credential type, you do not need to assert that the `tower_credential_type` call properly worked, you can assume it will. In addition, when cleaning up and deleting the `tower_credential_type`, you do not need to assert that it properly deleted the credential type.
When writing an integration test, a test of asset type A does not need to make assertions for asset type B. For example, if you are writing an integration test for a credential and you create a custom credential type, you do not need to assert that the `credential_type` call properly worked, you can assume it will. In addition, when cleaning up and deleting the `credential_type`, you do not need to assert that it properly deleted the credential type.
## Running Unit Tests
@ -176,7 +176,7 @@ FAILED awx_collection/test/awx/test_module_utils.py::test_type_warning - SystemE
make: *** [Makefile:382: test_collection] Error 1
```
In addition to running all of the tests, you can also specify specific tests to run. This is useful when developing a single module. In this example, we will run the tests for the `tower_token` module:
In addition to running all of the tests, you can also specify specific tests to run. This is useful when developing a single module. In this example, we will run the tests for the `token` module:
```
$ pytest awx_collection/test/awx/test_token.py
@ -195,7 +195,7 @@ awx_collection/test/awx/test_token.py . [100%]
## Running Integration Tests
For integration tests, you will need an existing AWX or Ansible Tower instance to run the test playbooks against. You can write a simple `run_it.yml` playbook to invoke the main method:
For integration tests, you will need an existing AWX or Automation Platform Controller instance to run the test playbooks against. You can write a simple `run_it.yml` playbook to invoke the main method:
```
---
@ -215,7 +215,7 @@ For integration tests, you will need an existing AWX or Ansible Tower instance t
- include_tasks: main.yml
```
Place this file in the `/tasks` directory of the test playbook you'd like to run (i.e., `awx/awx_collection/tests/integration/targets/tower_ad_hoc_command_cancel/tasks/`; a test playbook named `main.yml` must be in the same directory).
Place this file in the `/tasks` directory of the test playbook you'd like to run (i.e., `awx/awx_collection/tests/integration/targets/ad_hoc_command_cancel/tasks/`; a test playbook named `main.yml` must be in the same directory).
The `run_it.yml` playbook will set up your connection parameters via environment variables and then invoke the `main.yml` play of the role.

View File

@ -13,7 +13,7 @@
authors:
- AWX Project Contributors <awx-project@googlegroups.com>
dependencies: {}
description: Ansible content that interacts with the AWX or Ansible Tower API.
description: Ansible content that interacts with the AWX or Automation Platform Controller API.
documentation: https://github.com/ansible/awx/blob/devel/awx_collection/README.md
homepage: https://www.ansible.com/
issues: https://github.com/ansible/awx/issues?q=is%3Aissue+label%3Acomponent%3Aawx_collection

View File

@ -10,37 +10,37 @@ __metaclass__ = type
class ModuleDocFragment(object):
# Ansible Tower documentation fragment
# Automation Platform Controller documentation fragment
DOCUMENTATION = r'''
options:
tower_host:
description:
- URL to your Tower or AWX instance.
- URL to your Automation Platform Controller 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
tower_username:
description:
- Username for your Tower or AWX instance.
- Username for your controller instance.
- If value not set, will try environment variable C(TOWER_USERNAME) and then config files
type: str
tower_password:
description:
- Password for your Tower or AWX instance.
- Password for your controller instance.
- If value not set, will try environment variable C(TOWER_PASSWORD) and then config files
type: str
tower_oauthtoken:
description:
- The Tower OAuth token to use.
- 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 tower_token module.
- A dictionary structure as returned by the token module.
- If value not set, will try environment variable C(TOWER_OAUTH_TOKEN) and then config files
type: raw
version_added: "3.7"
validate_certs:
description:
- Whether to allow insecure connections to Tower or AWX.
- 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(TOWER_VERIFY_SSL) and then config files
@ -48,14 +48,14 @@ options:
aliases: [ tower_verify_ssl ]
tower_config_file:
description:
- Path to the Tower or AWX config file.
- Path to the controller config file.
- If provided, the other locations for config files will not be considered.
type: path
notes:
- If no I(config_file) is provided we will attempt to use the tower-cli library
defaults to find your Tower host information.
- I(config_file) should contain Tower configuration in the following format
defaults to find your host information.
- I(config_file) should be in the following format
host=hostname
username=username
password=password

View File

@ -10,28 +10,28 @@ __metaclass__ = type
class ModuleDocFragment(object):
# Automation Controller documentation fragment
# Automation Platform Controller documentation fragment
DOCUMENTATION = r'''
options:
tower_host:
description:
- URL to your Tower or AWX instance.
- URL to your Automation Platform Controller 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
tower_username:
description:
- Username for your Tower or AWX instance.
- Username for your controller instance.
- If value not set, will try environment variable C(TOWER_USERNAME) and then config files
type: str
tower_password:
description:
- Password for your Tower or AWX instance.
- Password for your controller instance.
- If value not set, will try environment variable C(TOWER_PASSWORD) and then config files
type: str
validate_certs:
description:
- Whether to allow insecure connections to Tower or AWX.
- Whether to allow insecure connections.
- 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
@ -39,14 +39,14 @@ options:
aliases: [ tower_verify_ssl ]
tower_config_file:
description:
- Path to the Tower or AWX config file.
- Path to the controller config file.
- If provided, the other locations for config files will not be considered.
type: path
notes:
- If no I(config_file) is provided we will attempt to use the tower-cli library
defaults to find your Tower host information.
- I(config_file) should contain Tower configuration in the following format
defaults to find your host information.
- I(config_file) should be in the following format
host=hostname
username=username
password=password

View File

@ -10,29 +10,29 @@ __metaclass__ = type
class ModuleDocFragment(object):
# Automation Controller documentation fragment
# Automation Platform Controller documentation fragment
DOCUMENTATION = r'''
options:
host:
description: The network address of your Automation Controller host.
description: The network address of your Automation Platform Controller host.
env:
- name: TOWER_HOST
username:
description: The user that you plan to use to access inventories on Automation Controller.
description: The user that you plan to use to access inventories on the controller.
env:
- name: TOWER_USERNAME
password:
description: The password for your Automation Controller user.
description: The password for your controller user.
env:
- name: TOWER_PASSWORD
oauth_token:
description:
- The Tower OAuth token to use.
- The OAuth token to use.
env:
- name: TOWER_OAUTH_TOKEN
verify_ssl:
description:
- Specify whether Ansible should verify the SSL certificate of Automation Controller host.
- Specify whether Ansible should verify the SSL certificate of the controller host.
- Defaults to True, but this is handled by the shared module_utils code
type: bool
env:
@ -41,8 +41,8 @@ options:
notes:
- If no I(config_file) is provided we will attempt to use the tower-cli library
defaults to find your Tower host information.
- I(config_file) should contain Tower configuration in the following format
defaults to find your host information.
- I(config_file) should be in the following format
host=hostname
username=username
password=password

View File

@ -6,14 +6,14 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
name: tower
name: controller
plugin_type: inventory
author:
- Matthew Jones (@matburt)
- Yunfan Zhang (@YunfanZhang42)
short_description: Ansible dynamic inventory plugin for Automation Controller.
short_description: Ansible dynamic inventory plugin for the Automation Platform Controller.
description:
- Reads inventories from Automation Controller.
- Reads inventories from the Automation Platform Controller.
- Supports reading configuration from both YAML config file and environment variables.
- If reading from the YAML file, the file name must end with tower.(yml|yaml) or tower_inventory.(yml|yaml),
the path in the command would be /path/to/tower_inventory.(yml|yaml). If some arguments in the config file
@ -23,7 +23,7 @@ extends_documentation_fragment: awx.awx.auth_plugin
options:
inventory_id:
description:
- The ID of the Automation Controller inventory that you wish to import.
- The ID of the inventory that you wish to import.
- This is allowed to be either the inventory primary key or its named URL slug.
- Primary key values will be accepted as strings or integers, and URL slugs must be strings.
- Named URL slugs follow the syntax of "inventory_name++organization_name".
@ -32,7 +32,7 @@ options:
- name: TOWER_INVENTORY
required: True
include_metadata:
description: Make extra requests to provide all group vars with metadata about the source Automation Controller host.
description: Make extra requests to provide all group vars with metadata about the source host.
type: bool
default: False
'''
@ -43,11 +43,11 @@ EXAMPLES = '''
# Example for using tower_inventory.yml file
plugin: awx.awx.tower
host: your_ansible_tower_server_network_address
username: your_ansible_tower_username
password: your_ansible_tower_password
inventory_id: the_ID_of_targeted_ansible_tower_inventory
plugin: awx.awx.controller
host: your_automation_controller_server_network_address
username: your_automation_controller_username
password: your_automation_controller_password
inventory_id: the_ID_of_targeted_automation_controller_inventory
# Then you can run the following command.
# If some of the arguments are missing, Ansible will attempt to read them from environment variables.
# ansible-inventory -i /path/to/tower_inventory.yml --list
@ -59,7 +59,7 @@ inventory_id: the_ID_of_targeted_ansible_tower_inventory
# export TOWER_USERNAME=YOUR_TOWER_USERNAME
# export TOWER_PASSWORD=YOUR_TOWER_PASSWORD
# export TOWER_INVENTORY=THE_ID_OF_TARGETED_INVENTORY
# Read the inventory specified in TOWER_INVENTORY from Automation Controller, and list them.
# Read the inventory specified in TOWER_INVENTORY from the controller, and list them.
# The inventory path must always be @tower_inventory if you are reading all settings from environment variables.
# ansible-inventory -i @tower_inventory --list
'''
@ -80,7 +80,7 @@ def handle_error(**kwargs):
class InventoryModule(BaseInventoryPlugin):
NAME = 'awx.awx.tower' # REPLACE
NAME = 'awx.awx.controller' # REPLACE
# Stays backward compatible with tower inventory script.
# If the user supplies '@tower_inventory' as path, the plugin will read from environment variables.
no_config_file_supplied = False

View File

@ -11,10 +11,10 @@ short_description: Search the API for objects
requirements:
- None
description:
- Returns GET requests from the Automation Controller API. See
- Returns GET requests from the Automation Platform Controller API. See
U(https://docs.ansible.com/ansible-tower/latest/html/towerapi/index.html) for API usage.
- For use that is cross-compatible between the awx.awx and ansible.tower collection
see the tower_meta module
- For use that is cross-compatible between the awx.awx and ansible.controller collection
see the controller_meta module
extends_documentation_fragment: awx.awx.auth_plugin
options:
_terms:
@ -71,11 +71,11 @@ notes:
EXAMPLES = """
- name: Load the UI settings
set_fact:
tower_settings: "{{ lookup('awx.awx.controller_api', 'settings/ui') }}"
controller_settings: "{{ lookup('awx.awx.controller_api', 'settings/ui') }}"
- name: Load the UI settings specifying the connection info
set_fact:
tower_settings: "{{ lookup('awx.awx.controller_api', 'settings/ui' host='tower.example.com', username='admin', password=my_pass_var, verify_ssl=False) }}"
controller_settings: "{{ lookup('awx.awx.controller_api', 'settings/ui' host='tower.example.com', username='admin', password=my_pass_var, verify_ssl=False) }}"
- name: Report the usernames of all users with admin privs
debug:
@ -89,14 +89,14 @@ EXAMPLES = """
label: "{{ item['name'] }}"
- name: Make sure user 'john' is an org admin of the default org if the user exists
tower_role:
role:
organization: Default
role: admin
user: john
when: "lookup('awx.awx.controller_api', 'users', query_params={ 'username': 'john' }) | length == 1"
- name: Create an inventory group with all 'foo' hosts
tower_group:
group:
name: "Foo Group"
inventory: "Demo Inventory"
hosts: >-

View File

@ -5,9 +5,9 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = """
lookup: tower_schedule_rrule
lookup: schedule_rrule
author: John Westcott IV (@john-westcott-iv)
short_description: Generate an rrule string which can be used for Tower Schedules
short_description: Generate an rrule string which can be used for Schedules
requirements:
- pytz
- python.dateutil >= 2.7.0
@ -75,7 +75,7 @@ DOCUMENTATION = """
EXAMPLES = """
- name: Create a string for a schedule
debug:
msg: "{{ query('awx.awx.tower_schedule_rrule', 'none', start_date='1979-09-13 03:45:07') }}"
msg: "{{ query('awx.awx.schedule_rrule', 'none', start_date='1979-09-13 03:45:07') }}"
"""
RETURN = """
@ -233,7 +233,7 @@ class LookupModule(LookupBase):
my_rule = rrule.rrule(**rrule_kwargs)
# All frequencies can use a timezone but rrule can't support the format that Tower uses.
# All frequencies can use a timezone but rrule can't support the format that AWX uses.
# So we will do a string manip here if we need to
timezone = 'America/New_York'
if 'timezone' in kwargs:
@ -243,7 +243,7 @@ class LookupModule(LookupBase):
# rrule puts a \n in the rule instad of a space and can't handle timezones
return_rrule = str(my_rule).replace('\n', ' ').replace('DTSTART:', 'DTSTART;TZID={0}:'.format(timezone))
# Tower requires an interval. rrule will not add interval if it's set to 1
# AWX requires an interval. rrule will not add interval if it's set to 1
if kwargs.get('every', 1) == 1:
return_rrule = "{0};INTERVAL=1".format(return_rrule)

View File

@ -21,7 +21,7 @@ class ControllerAPIModule(ControllerModule):
# Those values can be found in awx/api/generics.py line 204
collection_to_version = {
'awx': 'AWX',
'tower': 'Red Hat Automation Controller',
'controller': 'Red Hat Automation Platform Controller',
}
session = None
IDENTITY_FIELDS = {'users': 'username', 'workflow_job_template_nodes': 'identifier', 'instances': 'hostname'}
@ -190,7 +190,7 @@ class ControllerAPIModule(ControllerModule):
# Extract the headers, this will be used in a couple of places
headers = kwargs.get('headers', {})
# Authenticate to Tower (if we don't have a token and if not already done so)
# Authenticate to AWX (if we don't have a token and if not already done so)
if not self.oauth_token and not self.authenticated:
# This method will set a cookie in the cookie jar for us and also an oauth_token
self.authenticate(**kwargs)
@ -218,7 +218,7 @@ class ControllerAPIModule(ControllerModule):
self.fail_json(msg='The host sent back a server error ({1}): {0}. Please check the logs and try again later'.format(url.path, he))
# Sanity check: Did we fail to authenticate properly? If so, fail out now; this is always a failure.
elif he.code == 401:
self.fail_json(msg='Invalid Tower authentication credentials for {0} (HTTP 401).'.format(url.path))
self.fail_json(msg='Invalid authentication credentials for {0} (HTTP 401).'.format(url.path))
# Sanity check: Did we get a forbidden response, which means that the user isn't allowed to do this? Report that.
elif he.code == 403:
self.fail_json(msg="You don't have permission to {1} to {0} (HTTP 403).".format(url.path, method))
@ -232,7 +232,7 @@ class ControllerAPIModule(ControllerModule):
# A 405 means we used a method that isn't allowed. Usually this is a bad request, but it requires special treatment because the
# API sends it as a logic error in a few situations (e.g. trying to cancel a job that isn't running).
elif he.code == 405:
self.fail_json(msg="The Tower server says you can't make a request with the {0} method to this endpoint {1}".format(method, url.path))
self.fail_json(msg="Cannot make a request with the {0} method to this endpoint {1}".format(method, url.path))
# Sanity check: Did we get some other kind of error? If so, write an appropriate error message.
elif he.code >= 400:
# We are going to return a 400 so the module can decide what to do with it
@ -302,7 +302,7 @@ class ControllerAPIModule(ControllerModule):
# Attempt to get a token from /api/v2/tokens/ by giving it our username/password combo
# If we have a username and password, we need to get a session cookie
login_data = {
"description": "Automation Controller Module Token",
"description": "Automation Platform Controller Module Token",
"application": None,
"scope": "write",
}
@ -349,8 +349,8 @@ class ControllerAPIModule(ControllerModule):
# the on_delete parameter will be called as a method pasing in this object and the json from the response
# This will return one of two things:
# 1. None if the existing_item is not defined (so no delete needs to happen)
# 2. The response from Tower from calling the delete on the endpont. It's up to you to process the response and exit from the module
# Note: common error codes from the Tower API can cause the module to fail
# 2. The response from AWX from calling the delete on the endpont. It's up to you to process the response and exit from the module
# Note: common error codes from the AWX API can cause the module to fail
if existing_item:
# If we have an item, we can try to delete it
try:
@ -472,8 +472,8 @@ class ControllerAPIModule(ControllerModule):
# the on_create parameter will be called as a method pasing in this object and the json from the response
# This will return one of two things:
# 1. None if the existing_item is already defined (so no create needs to happen)
# 2. The response from Tower from calling the patch on the endpont. It's up to you to process the response and exit from the module
# Note: common error codes from the Tower API can cause the module to fail
# 2. The response from AWX from calling the patch on the endpont. It's up to you to process the response and exit from the module
# Note: common error codes from the AWX API can cause the module to fail
response = None
if not endpoint:
self.fail_json(msg="Unable to create new {0} due to missing endpoint".format(item_type))
@ -595,8 +595,8 @@ class ControllerAPIModule(ControllerModule):
# the on_update parameter will be called as a method pasing in this object and the json from the response
# This will return one of two things:
# 1. None if the existing_item does not need to be updated
# 2. The response from Tower from patching to the endpoint. It's up to you to process the response and exit from the module.
# Note: common error codes from the Tower API can cause the module to fail
# 2. The response from AWX from patching to the endpoint. It's up to you to process the response and exit from the module.
# Note: common error codes from the AWX API can cause the module to fail
response = None
if existing_item:

View File

@ -83,7 +83,7 @@ def tower_auth_config(module):
def tower_check_mode(module):
'''Execute check mode logic for Automation Controller modules'''
'''Execute check mode logic for Automation Platform Controller modules'''
if module.check_mode:
try:
result = client.get('/ping').json()

View File

@ -17,9 +17,9 @@ DOCUMENTATION = '''
module: ad_hoc_command
author: "John Westcott IV (@john-westcott-iv)"
version_added: "4.0"
short_description: create, update, or destroy Automation Controller ad hoc commands.
short_description: create, update, or destroy Automation Platform Controller ad hoc commands.
description:
- Create, update, or destroy Automation Controller ad hoc commands. See
- Create, update, or destroy Automation Platform Controller ad hoc commands. See
U(https://www.ansible.com/tower) for an overview.
options:
job_type:
@ -84,7 +84,7 @@ options:
type: bool
interval:
description:
- The interval to request an update from Tower.
- The interval to request an update from the controller.
default: 1
type: float
timeout:

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: ad_hoc_command_cancel
author: "John Westcott IV (@john-westcott-iv)"
short_description: Cancel an Automation Controller Ad Hoc Command.
short_description: Cancel an Ad Hoc Command.
description:
- Cancel Automation Controller ad hoc command. See
- Cancel ad hoc command. See
U(https://www.ansible.com/tower) for an overview.
options:
command_id:
@ -33,14 +33,14 @@ options:
type: bool
interval:
description:
- The interval in seconds, to request an update from Tower.
- The interval in seconds, to request an update from .
required: False
default: 1
type: float
timeout:
description:
- Maximum time in seconds to wait for a job to finish.
- Not specifying means the task will wait until Tower cancels the command.
- Not specifying means the task will wait until the controller cancels the command.
type: int
extends_documentation_fragment: awx.awx.auth
'''

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: ad_hoc_command_wait
author: "John Westcott IV (@john-westcott-iv)"
short_description: Wait for Automation Controller Ad Hoc Command to finish.
short_description: Wait for Automation Platform Controller Ad Hoc Command to finish.
description:
- Wait for Automation Controller ad hoc command to finish and report success or failure. See
- Wait for Automation Platform Controller ad hoc command to finish and report success or failure. See
U(https://www.ansible.com/tower) for an overview.
options:
command_id:
@ -28,7 +28,7 @@ options:
type: int
interval:
description:
- The interval in sections, to request an update from Tower.
- The interval in sections, to request an update from the controller.
required: False
default: 1
type: float
@ -112,7 +112,7 @@ def main():
)
if command is None:
module.fail_json(msg='Unable to wait on ad hoc command {0}; that ID does not exist in Tower.'.format(command_id))
module.fail_json(msg='Unable to wait on ad hoc command {0}; that ID does not exist.'.format(command_id))
# Invoke wait function
module.wait_on_url(url=command['url'], object_name=command_id, object_type='ad hoc command', timeout=timeout, interval=interval)

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: application
author: "Geoffrey Bacheot (@jffz)"
short_description: create, update, or destroy Automation Controller applications
short_description: create, update, or destroy Automation Platform Controller applications
description:
- Create, update, or destroy Automation Controller applications. See
- Create, update, or destroy Automation Platform Controller applications. See
U(https://www.ansible.com/tower) for an overview.
options:
name:

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: credential
author: "Wayne Witzel III (@wwitzel3)"
short_description: create, update, or destroy Automation Controller credential.
short_description: create, update, or destroy Automation Platform Controller credential.
description:
- Create, update, or destroy Automation Controller credentials. See
- Create, update, or destroy Automation Platform Controller credentials. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -56,7 +56,7 @@ options:
description:
- >-
Credential inputs where the keys are var names used in templating.
Refer to the Automation Controller documentation for example syntax.
Refer to the Automation Platform Controller documentation for example syntax.
- Any fields in this dict will take prescedence over any fields mentioned below (i.e. host, username, etc)
type: dict
update_secrets:
@ -96,7 +96,7 @@ options:
password:
description:
- Password for this credential. ``secret_key`` for AWS. ``api_key`` for RAX.
- Use "ASK" and launch in Tower to be prompted.
- Use "ASK" and launch job to be prompted.
- Deprecated, please use inputs
type: str
project:
@ -112,7 +112,7 @@ options:
ssh_key_unlock:
description:
- Unlock password for ssh_key.
- Use "ASK" and launch in Tower to be prompted.
- Use "ASK" and launch job to be prompted.
- Deprecated, please use inputs
type: str
authorize:
@ -166,19 +166,19 @@ options:
become_username:
description:
- Become username.
- Use "ASK" and launch in Tower to be prompted.
- Use "ASK" and launch job to be prompted.
- Deprecated, please use inputs
type: str
become_password:
description:
- Become password.
- Use "ASK" and launch in Tower to be prompted.
- Use "ASK" and launch job to be prompted.
- Deprecated, please use inputs
type: str
vault_password:
description:
- Vault password.
- Use "ASK" and launch in Tower to be prompted.
- Use "ASK" and launch job to be prompted.
- Deprecated, please use inputs
type: str
vault_id:
@ -203,7 +203,7 @@ notes:
EXAMPLES = '''
- name: Add tower machine credential
- name: Add machine credential
credential:
name: Team Name
description: Team Description
@ -229,7 +229,7 @@ EXAMPLES = '''
src: '$HOME/.ssh/aws-private.pem'
register: aws_ssh_key
- name: Add Credential Into Tower
- name: Add Credential
credential:
name: Workshop Credential
credential_type: Machine

View File

@ -17,9 +17,9 @@ DOCUMENTATION = '''
module: credential_input_source
author: "Tom Page (@Tompage1994)"
version_added: "2.3"
short_description: create, update, or destroy Automation Controller credential input sources.
short_description: create, update, or destroy Automation Platform Controller credential input sources.
description:
- Create, update, or destroy Automation Controller credential input sources. See
- Create, update, or destroy Automation Platform Controller credential input sources. See
U(https://www.ansible.com/tower) for an overview.
options:
description:

View File

@ -17,9 +17,9 @@ DOCUMENTATION = '''
---
module: credential_type
author: "Adrien Fleury (@fleu42)"
short_description: Create, update, or destroy custom Automation Controller credential type.
short_description: Create, update, or destroy custom Automation Platform Controller credential type.
description:
- Create, update, or destroy Automation Controller credential type. See
- Create, update, or destroy Automation Platform Controller credential type. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -42,14 +42,14 @@ options:
inputs:
description:
- >-
Enter inputs using either JSON or YAML syntax. Refer to the Ansible
Tower documentation for example syntax.
Enter inputs using either JSON or YAML syntax. Refer to the
Automation Platform Controler documentation for example syntax.
type: dict
injectors:
description:
- >-
Enter injectors using either JSON or YAML syntax. Refer to the
Automation Controller documentation for example syntax.
Automation Platform Controller documentation for example syntax.
type: dict
state:
description:

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: execution_environment
author: "Shane McDonald (@shanemcd)"
short_description: create, update, or destroy Execution Environments in Automation Controller.
short_description: create, update, or destroy Execution Environments in Automation Platform Controller.
description:
- Create, update, or destroy Execution Environments in Automation Controller. See
- Create, update, or destroy Execution Environments in Automation Platform Controller. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -60,7 +60,7 @@ extends_documentation_fragment: awx.awx.auth
EXAMPLES = '''
- name: Add EE to Tower
- name: Add EE to the controller instance
execution_environment:
name: "My EE"
image: quay.io/ansible/awx-ee

View File

@ -17,9 +17,9 @@ DOCUMENTATION = '''
module: export
author: "John Westcott IV (@john-westcott-iv)"
version_added: "3.7"
short_description: export resources from Automation Controller.
short_description: export resources from Automation Platform Controller.
description:
- Export assets from Automation Controller.
- Export assets from Automation Platform Controller.
options:
all:
description:
@ -82,7 +82,7 @@ extends_documentation_fragment: awx.awx.auth
'''
EXAMPLES = '''
- name: Export all tower assets
- name: Export all assets
export:
all: True
@ -124,7 +124,7 @@ def main():
if not HAS_EXPORTABLE_RESOURCES:
module.fail_json(msg="Your version of awxkit does not have import/export")
# The export process will never change a Tower system
# The export process will never change the AWX system
module.json_output['changed'] = False
# The exporter code currently works like the following:

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: group
author: "Wayne Witzel III (@wwitzel3)"
short_description: create, update, or destroy Automation Controller group.
short_description: create, update, or destroy Automation Platform Controller group.
description:
- Create, update, or destroy Automation Controller groups. See
- Create, update, or destroy Automation Platform Controller groups. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -53,12 +53,12 @@ options:
- groups
preserve_existing_hosts:
description:
- Provide option (False by default) to preserves existing hosts in an existing group in tower.
- Provide option (False by default) to preserves existing hosts in an existing group.
default: False
type: bool
preserve_existing_children:
description:
- Provide option (False by default) to preserves existing children in an existing group in tower.
- Provide option (False by default) to preserves existing children in an existing group.
default: False
type: bool
aliases:
@ -78,7 +78,7 @@ extends_documentation_fragment: awx.awx.auth
EXAMPLES = '''
- name: Add tower group
- name: Add group
group:
name: localhost
description: "Local Host Group"
@ -86,7 +86,7 @@ EXAMPLES = '''
state: present
tower_config_file: "~/tower_cli.cfg"
- name: Add tower group
- name: Add group
group:
name: Cities
description: "Local Host Group"

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: host
author: "Wayne Witzel III (@wwitzel3)"
short_description: create, update, or destroy Automation Controller host.
short_description: create, update, or destroy Automation Platform Controller host.
description:
- Create, update, or destroy Automation Controller hosts. See
- Create, update, or destroy Automation Platform Controller hosts. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -59,7 +59,7 @@ extends_documentation_fragment: awx.awx.auth
EXAMPLES = '''
- name: Add tower host
- name: Add host
host:
name: localhost
description: "Local Host Group"

View File

@ -17,15 +17,15 @@ DOCUMENTATION = '''
module: import
author: "John Westcott (@john-westcott-iv)"
version_added: "3.7"
short_description: import resources into Automation Controller.
short_description: import resources into Automation Platform Controller.
description:
- Import assets into Automation Controller. See
- Import assets into Automation Platform Controller. See
U(https://www.ansible.com/tower) for an overview.
options:
assets:
description:
- The assets to import.
- This can be the output of tower_export or loaded from a file
- This can be the output of the export module or loaded from a file
required: True
type: dict
requirements:
@ -39,7 +39,7 @@ EXAMPLES = '''
all: True
register: export_output
- name: Import all tower assets from our export
- name: Import all assets from our export
import:
assets: "{{ export_output.assets }}"

View File

@ -17,9 +17,9 @@ DOCUMENTATION = '''
module: instance_group
author: "John Westcott IV (@john-westcott-iv)"
version_added: "4.0"
short_description: create, update, or destroy Automation Controller instance groups.
short_description: create, update, or destroy Automation Platform Controller instance groups.
description:
- Create, update, or destroy Automation Controller instance groups. See
- Create, update, or destroy Automation Platform Controller instance groups. See
U(https://www.ansible.com/tower) for an overview.
options:
name:

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: inventory
author: "Wayne Witzel III (@wwitzel3)"
short_description: create, update, or destroy Automation Controller inventory.
short_description: create, update, or destroy Automation Platform Controller inventory.
description:
- Create, update, or destroy Automation Controller inventories. See
- Create, update, or destroy Automation Platform Controller inventories. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -77,7 +77,7 @@ extends_documentation_fragment: awx.awx.auth
EXAMPLES = '''
- name: Add tower inventory
- name: Add inventory
inventory:
name: "Foo Inventory"
description: "Our Foo Cloud Servers"
@ -85,7 +85,7 @@ EXAMPLES = '''
state: present
tower_config_file: "~/tower_cli.cfg"
- name: Copy tower inventory
- name: Copy inventory
inventory:
name: Copy Foo Inventory
copy_from: Default Inventory

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: inventory_source
author: "Adrien Fleury (@fleu42)"
short_description: create, update, or destroy Automation Controller inventory source.
short_description: create, update, or destroy Automation Platform Controller inventory source.
description:
- Create, update, or destroy Automation Controller inventory source. See
- Create, update, or destroy Automation Platform Controller inventory source. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -162,7 +162,7 @@ def main():
description=dict(),
inventory=dict(required=True),
#
# How do we handle manual and file? Tower does not seem to be able to activate them
# How do we handle manual and file? The controller does not seem to be able to activate them
#
source=dict(choices=["scm", "ec2", "gce", "azure_rm", "vmware", "satellite6", "openstack", "rhv", "tower"]),
source_path=dict(),

View File

@ -18,7 +18,7 @@ module: inventory_source_update
author: "Bianca Henderson (@beeankha)"
short_description: Update inventory source(s).
description:
- Update Automation Controller inventory source(s). See
- Update Automation Platform Controller inventory source(s). See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -44,7 +44,7 @@ options:
type: bool
interval:
description:
- The interval to request an update from Tower.
- The interval to request an update from the controller.
required: False
default: 1
type: float

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: job_cancel
author: "Wayne Witzel III (@wwitzel3)"
short_description: Cancel an Automation Controller Job.
short_description: Cancel an Automation Platform Controller Job.
description:
- Cancel Automation Controller jobs. See
- Cancel Automation Platform Controller jobs. See
U(https://www.ansible.com/tower) for an overview.
options:
job_id:
@ -81,7 +81,7 @@ def main():
cancel_page = module.get_endpoint(job['related']['cancel'])
if 'json' not in cancel_page or 'can_cancel' not in cancel_page['json']:
module.fail_json(msg="Failed to cancel job, got unexpected response from tower", **{'response': cancel_page})
module.fail_json(msg="Failed to cancel job, got unexpected response from the controller", **{'response': cancel_page})
if not cancel_page['json']['can_cancel']:
if fail_if_not_running:

View File

@ -18,7 +18,7 @@ module: job_launch
author: "Wayne Witzel III (@wwitzel3)"
short_description: Launch an Ansible Job.
description:
- Launch an Automation Controller jobs. See
- Launch an Automation Platform Controller jobs. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -51,7 +51,7 @@ options:
extra_vars:
description:
- extra_vars to use for the Job Template.
- ask_extra_vars needs to be set to True via tower_job_template module
- ask_extra_vars needs to be set to True via job_template module
when creating the Job Template.
type: dict
limit:
@ -93,7 +93,7 @@ options:
type: bool
interval:
description:
- The interval to request an update from Tower.
- The interval to request an update from the controller.
required: False
default: 1
type: float
@ -111,7 +111,7 @@ EXAMPLES = '''
job_template: "My Job Template"
register: job
- name: Launch a job template with extra_vars on remote Tower instance
- name: Launch a job template with extra_vars on remote controller instance
job_launch:
job_template: "My Job Template"
extra_vars:

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: job_list
author: "Wayne Witzel III (@wwitzel3)"
short_description: List Automation Controller jobs.
short_description: List Automation Platform Controller jobs.
description:
- List Automation Controller jobs. See
- List Automation Platform Controller jobs. See
U(https://www.ansible.com/tower) for an overview.
options:
status:

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: job_template
author: "Wayne Witzel III (@wwitzel3)"
short_description: create, update, or destroy Automation Controller job templates.
short_description: create, update, or destroy Automation Platform Controller job templates.
description:
- Create, update, or destroy Automation Controller job templates. See
- Create, update, or destroy Automation Platform Controller job templates. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -57,7 +57,7 @@ options:
- Used to help lookup the object, cannot be modified using this module.
- The Organization is inferred from the associated project
- If not provided, will lookup by name only, which does not work with duplicates.
- Requires Tower Version 3.7.0 or AWX 10.0.0 IS NOT backwards compatible with earlier versions.
- Requires Automation Platform Version 3.7.0 or AWX 10.0.0 IS NOT backwards compatible with earlier versions.
type: str
project:
description:
@ -297,14 +297,14 @@ options:
extends_documentation_fragment: awx.awx.auth
notes:
- JSON for survey_spec can be found in Tower API Documentation. See
- JSON for survey_spec can be found in the API Documentation. See
U(https://docs.ansible.com/ansible-tower/latest/html/towerapi/api_ref.html#/Job_Templates/Job_Templates_job_templates_survey_spec_create)
for POST operation payload example.
'''
EXAMPLES = '''
- name: Create Tower Ping job template
- name: Create Ping job template
job_template:
name: "Ping"
job_type: "run"
@ -534,7 +534,7 @@ def main():
}
)
if project_data is None:
module.fail_json(msg="The project {0} in organization {1} was not found on the Tower server".format(project, organization))
module.fail_json(msg="The project {0} in organization {1} was not found on the controller instance server".format(project, organization))
new_fields['project'] = project_data['id']
else:
new_fields['project'] = module.resolve_name_to_id('projects', project)

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: job_wait
author: "Wayne Witzel III (@wwitzel3)"
short_description: Wait for Automation Controller job to finish.
short_description: Wait for Automation Platform Controller job to finish.
description:
- Wait for Automation Controller job to finish and report success or failure. See
- Wait for Automation Platform Controller job to finish and report success or failure. See
U(https://www.ansible.com/tower) for an overview.
options:
job_id:
@ -28,19 +28,19 @@ options:
type: int
interval:
description:
- The interval in sections, to request an update from Tower.
- The interval in sections, to request an update from the controller.
- For backwards compatibility if unset this will be set to the average of min and max intervals
required: False
default: 1
type: float
min_interval:
description:
- Minimum interval in seconds, to request an update from Tower.
- Minimum interval in seconds, to request an update from the controller.
- deprecated, use interval instead
type: float
max_interval:
description:
- Maximum interval in seconds, to request an update from Tower.
- Maximum interval in seconds, to request an update from the controller.
- deprecated, use interval instead
type: float
timeout:
@ -147,7 +147,7 @@ def main():
)
if job is None:
module.fail_json(msg='Unable to wait on ' + job_type.rstrip("s") + ' {0}; that ID does not exist in Tower.'.format(job_id))
module.fail_json(msg='Unable to wait on ' + job_type.rstrip("s") + ' {0}; that ID does not exist.'.format(job_id))
# Invoke wait function
result = module.wait_on_url(url=job['url'], object_name=job_id, object_type='legacy_job_wait', timeout=timeout, interval=interval)

View File

@ -16,11 +16,11 @@ DOCUMENTATION = '''
---
module: label
author: "Wayne Witzel III (@wwitzel3)"
short_description: create, update, or destroy Automation Controller labels.
short_description: create, update, or destroy Automation Platform Controller labels.
description:
- Create, update, or destroy Automation Controller labels. See
- Create, update, or destroy Automation Platform Controller labels. See
U(https://www.ansible.com/tower) for an overview.
- Note, labels can only be created via the Tower API, they can not be deleted.
- Note, labels can only be created via the API, they can not be deleted.
Once they are fully disassociated the API will clean them up on its own.
options:
name:
@ -47,7 +47,7 @@ extends_documentation_fragment: awx.awx.auth
'''
EXAMPLES = '''
- name: Add label to tower organization
- name: Add label to organization
label:
name: Custom Label
organization: My Organization

View File

@ -15,9 +15,9 @@ DOCUMENTATION = '''
---
module: license
author: "John Westcott IV (@john-westcott-iv)"
short_description: Set the license for Automation Controller
short_description: Set the license for Automation Platform Controller
description:
- Get or Set Automation Controller license. See
- Get or Set Automation Platform Controller license. See
U(https://www.ansible.com/tower) for an overview.
options:
manifest:

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: notification_template
author: "Samuel Carpentier (@samcarpentier)"
short_description: create, update, or destroy Automation Controller notification.
short_description: create, update, or destroy Automation Platform Controller notification.
description:
- Create, update, or destroy Automation Controller notifications. See
- Create, update, or destroy Automation Platform Controller notifications. See
U(https://www.ansible.com/tower) for an overview.
options:
name:

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: organization
author: "Wayne Witzel III (@wwitzel3)"
short_description: create, update, or destroy Automation Controller organizations
short_description: create, update, or destroy Automation Platform Controller organizations
description:
- Create, update, or destroy Automation Controller organizations. See
- Create, update, or destroy Automation Platform Controller organizations. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -86,21 +86,21 @@ extends_documentation_fragment: awx.awx.auth
EXAMPLES = '''
- name: Create tower organization
- name: Create organization
organization:
name: "Foo"
description: "Foo bar organization"
state: present
tower_config_file: "~/tower_cli.cfg"
- name: Create tower organization using 'foo-venv' as default Python virtualenv
- name: Create organization using 'foo-venv' as default Python virtualenv
organization:
name: "Foo"
description: "Foo bar organization using foo-venv"
state: present
tower_config_file: "~/tower_cli.cfg"
- name: Create tower organization that pulls content from galaxy.ansible.com
- name: Create organization that pulls content from galaxy.ansible.com
organization:
name: "Foo"
state: present

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: project
author: "Wayne Witzel III (@wwitzel3)"
short_description: create, update, or destroy Automation Controller projects
short_description: create, update, or destroy Automation Platform Controller projects
description:
- Create, update, or destroy Automation Controller projects. See
- Create, update, or destroy Automation Platform Controller projects. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -160,7 +160,7 @@ options:
type: bool
interval:
description:
- The interval to request an update from Tower.
- The interval to request an update from the controller.
- Requires wait.
required: False
default: 1
@ -170,7 +170,7 @@ extends_documentation_fragment: awx.awx.auth
EXAMPLES = '''
- name: Add tower project
- name: Add project
project:
name: "Foo"
description: "Foo bar project"
@ -178,7 +178,7 @@ EXAMPLES = '''
state: present
tower_config_file: "~/tower_cli.cfg"
- name: Add Tower Project with cache timeout
- name: Add Project with cache timeout
project:
name: "Foo"
description: "Foo bar project"
@ -188,7 +188,7 @@ EXAMPLES = '''
state: present
tower_config_file: "~/tower_cli.cfg"
- name: Copy tower project
- name: Copy project
project:
name: copy
copy_from: test

View File

@ -13,9 +13,9 @@ DOCUMENTATION = '''
---
module: project_update
author: "Sean Sullivan (@sean-m-sullivan)"
short_description: Update a Project in Automation Controller
short_description: Update a Project in Automation Platform Controller
description:
- Update a Automation Controller Project. See
- Update a Automation Platform Controller Project. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -39,7 +39,7 @@ options:
type: bool
interval:
description:
- The interval to request an update from Tower.
- The interval to request an update from the controller.
required: False
default: 1
type: float

View File

@ -20,9 +20,9 @@ deprecated:
why: Deprecated in favor of upcoming C(_export) module.
alternative: Once published, use M(tower_export) instead.
author: "John Westcott IV (@john-westcott-iv)"
short_description: Receive assets from Automation Controller.
short_description: Receive assets from Automation Platform Controller.
description:
- Receive assets from Automation Controller. See
- Receive assets from Automation Platform Controller. See
U(https://www.ansible.com/tower) for an overview.
options:
all:
@ -101,7 +101,7 @@ extends_documentation_fragment: awx.awx.auth_legacy
'''
EXAMPLES = '''
- name: Export all tower assets
- name: Export all Automation Platform Controller assets
receive:
all: True
tower_config_file: "~/tower_cli.cfg"

View File

@ -16,10 +16,10 @@ DOCUMENTATION = '''
---
module: role
author: "Wayne Witzel III (@wwitzel3)"
short_description: grant or revoke an Automation Controller role.
short_description: grant or revoke an Automation Platform Controller role.
description:
- Roles are used for access control, this module is for managing user access to server resources.
- Grant or revoke Automation Controller roles to users. See U(https://www.ansible.com/tower) for an overview.
- Grant or revoke Automation Platform Controller roles to users. See U(https://www.ansible.com/tower) for an overview.
options:
user:
description:

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: schedule
author: "John Westcott IV (@john-westcott-iv)"
short_description: create, update, or destroy Automation Controller schedules.
short_description: create, update, or destroy Automation Platform Controller schedules.
description:
- Create, update, or destroy Automation Controller schedules. See
- Create, update, or destroy Automation Platform Controller schedules. See
U(https://www.ansible.com/tower) for an overview.
options:
rrule:
@ -131,7 +131,7 @@ EXAMPLES = '''
name: "{{ sched1 }}"
state: present
unified_job_template: "Demo Job Template"
rrule: "{{ query('awx.awx.tower_schedule_rrule', 'week', start_date='2019-12-19 13:05:51') }}"
rrule: "{{ query('awx.awx.schedule_rrule', 'week', start_date='2019-12-19 13:05:51') }}"
register: result
'''

View File

@ -20,9 +20,9 @@ deprecated:
why: Deprecated in favor of upcoming C(_import) module.
alternative: Once published, use M(tower_import) instead.
author: "John Westcott IV (@john-westcott-iv)"
short_description: Send assets to Automation Controller.
short_description: Send assets to Automation Platform Controller.
description:
- Send assets to Automation Controller. See
- Send assets to Automation Platform Controller. See
U(https://www.ansible.com/tower) for an overview.
options:
assets:
@ -62,7 +62,7 @@ extends_documentation_fragment: awx.awx.auth_legacy
'''
EXAMPLES = '''
- name: Import all tower assets
- name: Import all Automation Platform Controller assets
send:
assets: "{{ export_output.assets }}"
tower_config_file: "~/tower_cli.cfg"

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: settings
author: "Nikhil Jain (@jainnikhil30)"
short_description: Modify Automation Controller settings.
short_description: Modify Automation Platform Controller settings.
description:
- Modify Automation Controller settings. See
- Modify Automation Platform Controller settings. See
U(https://www.ansible.com/tower) for an overview.
options:
name:

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: team
author: "Wayne Witzel III (@wwitzel3)"
short_description: create, update, or destroy Automation Controller team.
short_description: create, update, or destroy Automation Platform Controller team.
description:
- Create, update, or destroy Automation Controller teams. See
- Create, update, or destroy Automation Platform Controller teams. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -50,7 +50,7 @@ extends_documentation_fragment: awx.awx.auth
EXAMPLES = '''
- name: Create tower team
- name: Create team
team:
name: Team Name
description: Team Description

View File

@ -17,15 +17,15 @@ DOCUMENTATION = '''
module: token
author: "John Westcott IV (@john-westcott-iv)"
version_added: "2.3"
short_description: create, update, or destroy Automation Controller tokens.
short_description: create, update, or destroy Automation Platform Controller tokens.
description:
- Create or destroy Automation Controller tokens. See
- Create or destroy Automation Platform Controller tokens. See
U(https://www.ansible.com/tower) for an overview.
- In addition, the module sets an Ansible fact which can be passed into other
tower_* modules as the parameter tower_oauthtoken. See examples for usage.
controller modules as the parameter tower_oauthtoken. See examples for usage.
- Because of the sensitive nature of tokens, the created token value is only available once
through the Ansible fact. (See RETURN for details)
- Due to the nature of tokens in Tower this module is not idempotent. A second will
- Due to the nature of tokens this module is not idempotent. A second will
with the same parameters will create a new token.
- If you are creating a temporary token for use with modules you should delete the token
when you are done with it. See the example for how to do it.
@ -105,7 +105,7 @@ EXAMPLES = '''
RETURN = '''
token:
type: dict
description: An Ansible Fact variable representing a Tower token object which can be used for auth in subsequent modules. See examples for usage.
description: An Ansible Fact variable representing a token object which can be used for auth in subsequent modules. See examples for usage.
contains:
token:
description: The token that was generated. This token can never be accessed again, make sure this value is noted before it is lost.

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: user
author: "John Westcott IV (@john-westcott-iv)"
short_description: create, update, or destroy Automation Controller users.
short_description: create, update, or destroy Automation Platform Controller users.
description:
- Create, update, or destroy Automation Controller users. See
- Create, update, or destroy Automation Platform Controller users. See
U(https://www.ansible.com/tower) for an overview.
options:
username:
@ -71,7 +71,7 @@ extends_documentation_fragment: awx.awx.auth
EXAMPLES = '''
- name: Add tower user
- name: Add user
user:
username: jdoe
password: foobarbaz
@ -81,7 +81,7 @@ EXAMPLES = '''
state: present
tower_config_file: "~/tower_cli.cfg"
- name: Add tower user as a system administrator
- name: Add user as a system administrator
user:
username: jdoe
password: foobarbaz
@ -90,7 +90,7 @@ EXAMPLES = '''
state: present
tower_config_file: "~/tower_cli.cfg"
- name: Add tower user as a system auditor
- name: Add user as a system auditor
user:
username: jdoe
password: foobarbaz
@ -99,7 +99,7 @@ EXAMPLES = '''
state: present
tower_config_file: "~/tower_cli.cfg"
- name: Delete tower user
- name: Delete user
user:
username: jdoe
email: jdoe@example.org

View File

@ -43,7 +43,7 @@ options:
type: str
interval:
description:
- The interval in sections, to request an update from Tower.
- The interval in sections, to request an update from the controller.
required: False
default: 1
type: float

View File

@ -16,11 +16,11 @@ DOCUMENTATION = '''
---
module: workflow_job_template
author: "John Westcott IV (@john-westcott-iv)"
short_description: create, update, or destroy Automation Controller workflow job templates.
short_description: create, update, or destroy Automation Platform Controller workflow job templates.
description:
- Create, update, or destroy Automation Controller workflow job templates.
- Create, update, or destroy Automation Platform Controller workflow job templates.
- Replaces the deprecated tower_workflow_template module.
- Use the tower_workflow_job_template_node after this, or use the schema parameter to build the workflow's graph
- Use workflow_job_template_node after this, or use the schema parameter to build the workflow's graph
options:
name:
description:

View File

@ -16,9 +16,9 @@ DOCUMENTATION = '''
---
module: workflow_job_template_node
author: "John Westcott IV (@john-westcott-iv)"
short_description: create, update, or destroy Automation Controller workflow job template nodes.
short_description: create, update, or destroy Automation Platform Controller workflow job template nodes.
description:
- Create, update, or destroy Automation Controller workflow job template nodes.
- Create, update, or destroy Automation Platform Controller workflow job template nodes.
- Use this to build a graph for a workflow, which dictates what the workflow runs.
- Replaces the deprecated tower_workflow_template module schema command.
- You can create nodes first, and link them afterwards, and not worry about ordering.
@ -157,7 +157,7 @@ extends_documentation_fragment: awx.awx.auth
'''
EXAMPLES = '''
- name: Create a node, follows tower_workflow_job_template example
- name: Create a node, follows workflow_job_template example
workflow_job_template_node:
identifier: my-first-node
workflow: example-workflow
@ -283,7 +283,9 @@ def main():
wfjt_search_fields['organization'] = organization_id
wfjt_data = module.get_one('workflow_job_templates', name_or_id=workflow_job_template, **{'data': wfjt_search_fields})
if wfjt_data is None:
module.fail_json(msg="The workflow {0} in organization {1} was not found on the Tower server".format(workflow_job_template, organization))
module.fail_json(
msg="The workflow {0} in organization {1} was not found on the controller instance server".format(workflow_job_template, organization)
)
workflow_job_template_id = wfjt_data['id']
search_fields['workflow_job_template'] = new_fields['workflow_job_template'] = workflow_job_template_id

View File

@ -13,9 +13,9 @@ DOCUMENTATION = '''
---
module: workflow_launch
author: "John Westcott IV (@john-westcott-iv)"
short_description: Run a workflow in Automation Controller
short_description: Run a workflow in Automation Platform Controller
description:
- Launch an Automation Controller workflows. See
- Launch an Automation Platform Controller workflows. See
U(https://www.ansible.com/tower) for an overview.
options:
name:
@ -55,7 +55,7 @@ options:
type: bool
interval:
description:
- The interval to request an update from Tower.
- The interval to request an update from the controller.
required: False
default: 1
type: float

View File

@ -37,7 +37,7 @@ options:
type: str
interval:
description:
- The interval in sections, to request an update from Tower.
- The interval in sections, to request an update from the controller.
required: False
default: 1
type: float

View File

@ -20,7 +20,7 @@ deprecated:
why: Deprecated in favor of C(_workflow_job_template) and C(_workflow_job_template_node) modules.
alternative: Use M(tower_workflow_job_template) and M(_workflow_job_template_node) instead.
author: "Adrien Fleury (@fleu42)"
short_description: create, update, or destroy Automation Controller workflow template.
short_description: create, update, or destroy Automation Platform Controller workflow template.
description:
- A tower-cli based module for CRUD actions on workflow job templates.
- Enables use of the old schema functionality.
@ -64,7 +64,7 @@ options:
description:
- >
The schema is a JSON- or YAML-formatted string defining the
hierarchy structure that connects the nodes. Refer to Tower
hierarchy structure that connects the nodes. Refer to the Automation Platform
documentation for more information.
type: list
elements: dict

View File

@ -41,4 +41,4 @@ def test_ad_hoc_command_wait_failed(run_module, admin_user):
def test_ad_hoc_command_wait_not_found(run_module, admin_user):
result = run_module('ad_hoc_command_wait', dict(command_id=42), admin_user)
result.pop('invocation', None)
assert result == {"failed": True, "msg": "Unable to wait on ad hoc command 42; that ID does not exist in Tower."}
assert result == {"failed": True, "msg": "Unable to wait on ad hoc command 42; that ID does not exist."}

View File

@ -14,7 +14,7 @@ import re
# Read-only endpoints are dynamically created by an options page with no POST section.
# Normally a read-only endpoint should not have a module (i.e. /api/v2/me) but sometimes we reuse a name
# For example, we have a tower_role module but /api/v2/roles is a read only endpoint.
# For example, we have a role module but /api/v2/roles is a read only endpoint.
# This list indicates which read-only endpoints have associated modules with them.
read_only_endpoints_with_modules = ['settings', 'role', 'project_update']
@ -61,11 +61,11 @@ no_api_parameter_ok = {
'workflow_job_template_node': ['organization', 'approval_node'],
# Survey is how we handle associations
'workflow_job_template': ['survey_spec', 'destroy_current_schema'],
# ad hoc commands support interval and timeout since its more like tower_job_launch
# ad hoc commands support interval and timeout since its more like job_launch
'ad_hoc_command': ['interval', 'timeout', 'wait'],
# tower_group parameters to perserve hosts and children.
# group parameters to perserve hosts and children.
'group': ['preserve_existing_children', 'preserve_existing_hosts'],
# tower_workflow_approval parameters that do not apply when approving an approval node.
# workflow_approval parameters that do not apply when approving an approval node.
'workflow_approval': ['action', 'interval', 'timeout', 'workflow_job_id'],
}

View File

@ -78,7 +78,7 @@ def test_children_alias_of_groups(run_module, admin_user, organization):
@pytest.mark.django_db
def test_tower_group_idempotent(run_module, admin_user):
def test_group_idempotent(run_module, admin_user):
# https://github.com/ansible/ansible/issues/46803
org = Organization.objects.create(name='test-org')
inv = Inventory.objects.create(name='test-inv', organization=org)

View File

@ -34,4 +34,4 @@ def test_job_wait_failed(run_module, admin_user):
def test_job_wait_not_found(run_module, admin_user):
result = run_module('job_wait', dict(job_id=42), admin_user)
result.pop('invocation', None)
assert result == {"failed": True, "msg": "Unable to wait on job 42; that ID does not exist in Tower."}
assert result == {"failed": True, "msg": "Unable to wait on job 42; that ID does not exist."}

View File

@ -10,7 +10,7 @@ from requests.models import Response
from unittest import mock
awx_name = 'AWX'
tower_name = 'Red Hat Automation Controller'
tower_name = 'Red Hat Automation Platform Controller'
ping_version = '1.2.3'
@ -32,7 +32,7 @@ def status(self):
return 200
def mock_tower_ping_response(self, method, url, **kwargs):
def mock_controller_ping_response(self, method, url, **kwargs):
r = Response()
r.getheader = getTowerheader.__get__(r)
r.read = read.__get__(r)
@ -86,25 +86,25 @@ def test_version_warning_strictness_awx(collection_import, silence_warning):
silence_warning.assert_not_called()
def test_version_warning_strictness_tower(collection_import, silence_warning):
def test_version_warning_strictness_controller(collection_import, silence_warning):
ControllerAPIModule = collection_import('plugins.module_utils.controller_api').ControllerAPIModule
cli_data = {'ANSIBLE_MODULE_ARGS': {}}
testargs = ['module_file2.py', json.dumps(cli_data)]
# Compare 1.2.0 to 1.2.3 (major/minor matches)
with mock.patch.object(sys, 'argv', testargs):
with mock.patch('ansible.module_utils.urls.Request.open', new=mock_tower_ping_response):
with mock.patch('ansible.module_utils.urls.Request.open', new=mock_controller_ping_response):
my_module = ControllerAPIModule(argument_spec=dict())
my_module._COLLECTION_VERSION = "1.2.0"
my_module._COLLECTION_TYPE = "tower"
my_module._COLLECTION_TYPE = "controller"
my_module.get_endpoint('ping')
silence_warning.assert_not_called()
# Compare 1.0.0 to 1.2.3 (major/minor fail to match)
with mock.patch.object(sys, 'argv', testargs):
with mock.patch('ansible.module_utils.urls.Request.open', new=mock_tower_ping_response):
with mock.patch('ansible.module_utils.urls.Request.open', new=mock_controller_ping_response):
my_module = ControllerAPIModule(argument_spec=dict())
my_module._COLLECTION_VERSION = "1.0.0"
my_module._COLLECTION_TYPE = "tower"
my_module._COLLECTION_TYPE = "controller"
my_module.get_endpoint('ping')
silence_warning.assert_called_once_with(
'You are running collection version {0} but connecting to {1} version {2}'.format(my_module._COLLECTION_VERSION, tower_name, ping_version)
@ -119,7 +119,7 @@ def test_type_warning(collection_import, silence_warning):
with mock.patch('ansible.module_utils.urls.Request.open', new=mock_awx_ping_response):
my_module = ControllerAPIModule(argument_spec={})
my_module._COLLECTION_VERSION = ping_version
my_module._COLLECTION_TYPE = "tower"
my_module._COLLECTION_TYPE = "controller"
my_module.get_endpoint('ping')
silence_warning.assert_called_once_with(
'You are using the {0} version of this collection but connecting to {1}'.format(my_module._COLLECTION_TYPE, awx_name)
@ -157,7 +157,7 @@ def test_no_templated_values(collection_import):
'The collection version is templated when the collection is built ' 'and the code should retain the placeholder of "0.0.1-devel".'
)
InventoryModule = collection_import('plugins.inventory.controller').InventoryModule
assert InventoryModule.NAME == 'awx.awx.tower', (
assert InventoryModule.NAME == 'awx.awx.controller', (
'The inventory plugin FQCN is templated when the collection is built ' 'and the code should retain the default of awx.awx.'
)

View File

@ -6,9 +6,9 @@
- name: Generate names
set_fact:
inv_name: "AWX-Collection-tests-tower_tower_ad_hoc_command-inventory-{{ test_id }}"
ssh_cred_name: "AWX-Collection-tests-tower_tower_ad_hoc_command-ssh-cred-{{ test_id }}"
org_name: "AWX-Collection-tests-tower_tower_ad_hoc_command-org-{{ test_id }}"
inv_name: "AWX-Collection-tests-ad_hoc_command-inventory-{{ test_id }}"
ssh_cred_name: "AWX-Collection-tests-ad_hoc_command-ssh-cred-{{ test_id }}"
org_name: "AWX-Collection-tests-ad_hoc_command-org-{{ test_id }}"
- name: Create a New Organization
organization:

View File

@ -6,9 +6,9 @@
- name: Generate names
set_fact:
inv_name: "AWX-Collection-tests-tower_tower_ad_hoc_command_cancel-inventory-{{ test_id }}"
ssh_cred_name: "AWX-Collection-tests-tower_tower_ad_hoc_command_cancel-ssh-cred-{{ test_id }}"
org_name: "AWX-Collection-tests-tower_tower_ad_hoc_command_cancel-org-{{ test_id }}"
inv_name: "AWX-Collection-tests-ad_hoc_command_cancel-inventory-{{ test_id }}"
ssh_cred_name: "AWX-Collection-tests-ad_hoc_command_cancel-ssh-cred-{{ test_id }}"
org_name: "AWX-Collection-tests-ad_hoc_command_cancel-org-{{ test_id }}"
- name: Create a New Organization
organization:

View File

@ -6,9 +6,9 @@
- name: Generate names
set_fact:
inv_name: "AWX-Collection-tests-tower_ad_hoc_command_wait-inventory-{{ test_id }}"
ssh_cred_name: "AWX-Collection-tests-tower_ad_hoc_command_wait-ssh-cred-{{ test_id }}"
org_name: "AWX-Collection-tests-tower_ad_hoc_command_wait-org-{{ test_id }}"
inv_name: "AWX-Collection-tests-ad_hoc_command_wait-inventory-{{ test_id }}"
ssh_cred_name: "AWX-Collection-tests-ad_hoc_command_wait-ssh-cred-{{ test_id }}"
org_name: "AWX-Collection-tests-ad_hoc_command_wait-org-{{ test_id }}"
- name: Create a New Organization
organization:
@ -43,7 +43,7 @@
- assert:
that:
- result is failed
- "result.msg == 'Unable to wait on ad hoc command 99999999; that ID does not exist in Tower.'"
- "result.msg == 'Unable to wait on ad hoc command 99999999; that ID does not exist.'"
- name: Launch command module with sleep 10
ad_hoc_command:

View File

@ -5,9 +5,9 @@
- name: Generate names
set_fact:
app1_name: "AWX-Collection-tests-tower_application-app1-{{ test_id }}"
app2_name: "AWX-Collection-tests-tower_application-app2-{{ test_id }}"
app3_name: "AWX-Collection-tests-tower_application-app3-{{ test_id }}"
app1_name: "AWX-Collection-tests-application-app1-{{ test_id }}"
app2_name: "AWX-Collection-tests-application-app2-{{ test_id }}"
app3_name: "AWX-Collection-tests-application-app3-{{ test_id }}"
- block:
- name: Create an application

View File

@ -6,23 +6,23 @@
- name: Generate names
set_fact:
ssh_cred_name1: "AWX-Collection-tests-tower_credential-ssh-cred1-{{ test_id }}"
ssh_cred_name2: "AWX-Collection-tests-tower_credential-ssh-cred2-{{ test_id }}"
ssh_cred_name3: "AWX-Collection-tests-tower_credential-ssh-cred-lookup-source-{{ test_id }}"
ssh_cred_name4: "AWX-Collection-tests-tower_credential-ssh-cred-file-source-{{ test_id }}"
vault_cred_name1: "AWX-Collection-tests-tower_credential-vault-cred1-{{ test_id }}"
vault_cred_name2: "AWX-Collection-tests-tower_credential-vault-ssh-cred1-{{ test_id }}"
net_cred_name1: "AWX-Collection-tests-tower_credential-net-cred1-{{ test_id }}"
scm_cred_name1: "AWX-Collection-tests-tower_credential-scm-cred1-{{ test_id }}"
aws_cred_name1: "AWX-Collection-tests-tower_credential-aws-cred1-{{ test_id }}"
vmware_cred_name1: "AWX-Collection-tests-tower_credential-vmware-cred1-{{ test_id }}"
sat6_cred_name1: "AWX-Collection-tests-tower_credential-sat6-cred1-{{ test_id }}"
gce_cred_name1: "AWX-Collection-tests-tower_credential-gce-cred1-{{ test_id }}"
azurerm_cred_name1: "AWX-Collection-tests-tower_credential-azurerm-cred1-{{ test_id }}"
openstack_cred_name1: "AWX-Collection-tests-tower_credential-openstack-cred1-{{ test_id }}"
rhv_cred_name1: "AWX-Collection-tests-tower_credential-rhv-cred1-{{ test_id }}"
insights_cred_name1: "AWX-Collection-tests-tower_credential-insights-cred1-{{ test_id }}"
tower_cred_name1: "AWX-Collection-tests-tower_credential-tower-cred1-{{ test_id }}"
ssh_cred_name1: "AWX-Collection-tests-credential-ssh-cred1-{{ test_id }}"
ssh_cred_name2: "AWX-Collection-tests-credential-ssh-cred2-{{ test_id }}"
ssh_cred_name3: "AWX-Collection-tests-credential-ssh-cred-lookup-source-{{ test_id }}"
ssh_cred_name4: "AWX-Collection-tests-credential-ssh-cred-file-source-{{ test_id }}"
vault_cred_name1: "AWX-Collection-tests-credential-vault-cred1-{{ test_id }}"
vault_cred_name2: "AWX-Collection-tests-credential-vault-ssh-cred1-{{ test_id }}"
net_cred_name1: "AWX-Collection-tests-credential-net-cred1-{{ test_id }}"
scm_cred_name1: "AWX-Collection-tests-credential-scm-cred1-{{ test_id }}"
aws_cred_name1: "AWX-Collection-tests-credential-aws-cred1-{{ test_id }}"
vmware_cred_name1: "AWX-Collection-tests-credential-vmware-cred1-{{ test_id }}"
sat6_cred_name1: "AWX-Collection-tests-credential-sat6-cred1-{{ test_id }}"
gce_cred_name1: "AWX-Collection-tests-credential-gce-cred1-{{ test_id }}"
azurerm_cred_name1: "AWX-Collection-tests-credential-azurerm-cred1-{{ test_id }}"
openstack_cred_name1: "AWX-Collection-tests-credential-openstack-cred1-{{ test_id }}"
rhv_cred_name1: "AWX-Collection-tests-credential-rhv-cred1-{{ test_id }}"
insights_cred_name1: "AWX-Collection-tests-credential-insights-cred1-{{ test_id }}"
tower_cred_name1: "AWX-Collection-tests-credential-tower-cred1-{{ test_id }}"
- name: create a tempdir for an SSH key
local_action: shell mktemp -d

View File

@ -6,11 +6,11 @@
- name: Generate names
set_fact:
src_cred_name: "AWX-Collection-tests-tower_credential_input_source-src_cred-{{ test_id }}"
target_cred_name: "AWX-Collection-tests-tower_credential_input_source-target_cred-{{ test_id }}"
src_cred_name: "AWX-Collection-tests-credential_input_source-src_cred-{{ test_id }}"
target_cred_name: "AWX-Collection-tests-credential_input_source-target_cred-{{ test_id }}"
- block:
- name: Add Tower credential Lookup
- name: Add credential Lookup
credential:
description: Credential for Testing Source
name: "{{ src_cred_name }}"
@ -25,7 +25,7 @@
that:
- "src_cred_result is changed"
- name: Add Tower credential Target
- name: Add credential Target
credential:
description: Credential for Testing Target
name: "{{ target_cred_name }}"
@ -54,7 +54,7 @@
that:
- "result is changed"
- name: Add Second Tower credential Lookup
- name: Add Second credential Lookup
credential:
description: Credential for Testing Source Change
name: "{{ src_cred_name }}-2"
@ -77,7 +77,7 @@
- "result is changed"
always:
- name: Remove a Tower credential source
- name: Remove a credential source
credential_input_source:
input_field_name: password
target_credential: "{{ target_cred_name }}"
@ -88,7 +88,7 @@
that:
- "result is changed"
- name: Remove Tower credential Lookup
- name: Remove credential Lookup
credential:
name: "{{ src_cred_name }}"
organization: Default
@ -96,7 +96,7 @@
state: absent
register: result
- name: Remove Alt Tower credential Lookup
- name: Remove Alt credential Lookup
credential:
name: "{{ src_cred_name }}-2"
organization: Default
@ -104,7 +104,7 @@
state: absent
register: result
- name: Remove Tower credential
- name: Remove credential
credential:
name: "{{ target_cred_name }}"
organization: Default

View File

@ -1,7 +1,7 @@
---
- name: Generate names
set_fact:
cred_type_name: "AWX-Collection-tests-tower_credential_type-cred-type-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
cred_type_name: "AWX-Collection-tests-credential_type-cred-type-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Add Tower credential type
credential_type:

View File

@ -6,9 +6,9 @@
- name: Generate names
set_fact:
org_name1: "AWX-Collection-tests-tower_export-organization-{{ test_id }}"
org_name2: "AWX-Collection-tests-tower_export-organization2-{{ test_id }}"
inventory_name1: "AWX-Collection-tests-tower_export-inv1-{{ test_id }}"
org_name1: "AWX-Collection-tests-export-organization-{{ test_id }}"
org_name2: "AWX-Collection-tests-export-organization2-{{ test_id }}"
inventory_name1: "AWX-Collection-tests-export-inv1-{{ test_id }}"
- block:
- name: Create some organizations
@ -23,7 +23,7 @@
name: "{{ inventory_name1 }}"
organization: "{{ org_name1 }}"
- name: Export all tower assets
- name: Export all assets
export:
all: true
register: all_assets

View File

@ -1,13 +1,13 @@
---
- name: Generate names
set_fact:
group_name1: "AWX-Collection-tests-tower_group-group-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
group_name2: "AWX-Collection-tests-tower_group-group-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
group_name3: "AWX-Collection-tests-tower_group-group-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
inv_name: "AWX-Collection-test-tower_group-inv-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
host_name1: "AWX-Collection-test-tower_group-host-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
host_name2: "AWX-Collection-test-tower_group-host-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
host_name3: "AWX-Collection-test-tower_group-host-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
group_name1: "AWX-Collection-tests-group-group-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
group_name2: "AWX-Collection-tests-group-group-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
group_name3: "AWX-Collection-tests-group-group-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
inv_name: "AWX-Collection-tests-group-inv-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
host_name1: "AWX-Collection-tests-group-host-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
host_name2: "AWX-Collection-tests-group-host-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
host_name3: "AWX-Collection-tests-group-host-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Create an Inventory
inventory:

View File

@ -1,8 +1,8 @@
---
- name: Generate names
set_fact:
host_name: "AWX-Collection-tests-tower_host-host-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
inv_name: "AWX-Collection-tests-tower_host-inv-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
host_name: "AWX-Collection-tests-host-host-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
inv_name: "AWX-Collection-tests-host-inv-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Create an Inventory
inventory:

View File

@ -6,8 +6,8 @@
- name: Generate names
set_fact:
org_name1: "AWX-Collection-tests-tower_import-organization-{{ test_id }}"
org_name2: "AWX-Collection-tests-tower_import-organization2-{{ test_id }}"
org_name1: "AWX-Collection-tests-import-organization-{{ test_id }}"
org_name2: "AWX-Collection-tests-import-organization2-{{ test_id }}"
- block:
- name: "Import something"

View File

@ -5,9 +5,9 @@
- name: Generate names
set_fact:
group_name1: "AWX-Collection-tests-tower_instance_group-group1-{{ test_id }}"
group_name2: "AWX-Collection-tests-tower_instance_group-group2-{{ test_id }}"
cred_name1: "AWX-Collection-tests-tower_instance_group-cred1-{{ test_id }}"
group_name1: "AWX-Collection-tests-instance_group-group1-{{ test_id }}"
group_name2: "AWX-Collection-tests-instance_group-group2-{{ test_id }}"
cred_name1: "AWX-Collection-tests-instance_group-cred1-{{ test_id }}"
- block:
- name: Create an OpenShift Credential

View File

@ -5,10 +5,10 @@
- name: Generate names
set_fact:
inv_name1: "AWX-Collection-tests-tower_inventory-inv1-{{ test_id }}"
inv_name2: "AWX-Collection-tests-tower_inventory-inv2-{{ test_id }}"
cred_name1: "AWX-Collection-tests-tower_inventory-cred1-{{ test_id }}"
group_name1: "AWX-Collection-tests-tower_instance_group-group1-{{ test_id }}"
inv_name1: "AWX-Collection-tests-inventory-inv1-{{ test_id }}"
inv_name2: "AWX-Collection-tests-inventory-inv2-{{ test_id }}"
cred_name1: "AWX-Collection-tests-inventory-cred1-{{ test_id }}"
group_name1: "AWX-Collection-tests-instance_group-group1-{{ test_id }}"
- block:

View File

@ -1,11 +1,11 @@
---
- name: Generate names
set_fact:
openstack_cred: "AWX-Collection-tests-tower_inventory_source-cred-openstack-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
openstack_inv: "AWX-Collection-tests-tower_inventory_source-inv-openstack-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
openstack_inv_source: "AWX-Collection-tests-tower_inventory_source-inv-source-openstack-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
openstack_cred: "AWX-Collection-tests-inventory_source-cred-openstack-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
openstack_inv: "AWX-Collection-tests-inventory_source-inv-openstack-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
openstack_inv_source: "AWX-Collection-tests-inventory_source-inv-source-openstack-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Add a Tower credential
- name: Add a credential
credential:
description: Credentials for Openstack Test project
name: "{{ openstack_cred }}"
@ -18,7 +18,7 @@
domain: test
register: credential_result
- name: Add a Tower inventory
- name: Add an inventory
inventory:
description: Test inventory
organization: Default

View File

@ -5,12 +5,12 @@
- name: Generate names
set_fact:
project_name: "AWX-Collection-tests-tower_inventory_source_update-project-{{ test_id }}"
inv_name: "AWX-Collection-tests-tower_inventory_source_update-inv-{{ test_id }}"
inv_source1: "AWX-Collection-tests-tower_inventory_source_update-source1-{{ test_id }}"
inv_source2: "AWX-Collection-tests-tower_inventory_source_update-source2-{{ test_id }}"
inv_source3: "AWX-Collection-tests-tower_inventory_source_update-source3-{{ test_id }}"
org_name: "AWX-Collection-tests-tower_inventory_source_update-org-{{ test_id }}"
project_name: "AWX-Collection-tests-inventory_source_update-project-{{ test_id }}"
inv_name: "AWX-Collection-tests-inventory_source_update-inv-{{ test_id }}"
inv_source1: "AWX-Collection-tests-inventory_source_update-source1-{{ test_id }}"
inv_source2: "AWX-Collection-tests-inventory_source_update-source2-{{ test_id }}"
inv_source3: "AWX-Collection-tests-inventory_source_update-source3-{{ test_id }}"
org_name: "AWX-Collection-tests-inventory_source_update-org-{{ test_id }}"
- block:

View File

@ -1,9 +1,9 @@
---
- name: Generate names
set_fact:
jt_name1: "AWX-Collection-tests-tower_job_launch-jt1-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
jt_name2: "AWX-Collection-tests-tower_job_launch-jt2-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
proj_name: "AWX-Collection-tests-tower_job_launch-project-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
jt_name1: "AWX-Collection-tests-job_launch-jt1-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
jt_name2: "AWX-Collection-tests-job_launch-jt2-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
proj_name: "AWX-Collection-tests-job_launch-project-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Launch a Job Template
job_launch:

View File

@ -5,17 +5,17 @@
- name: generate random string for project
set_fact:
org_name: "AWX-Collection-tests-tower_organization-org-{{ test_id }}"
cred1: "AWX-Collection-tests-tower_job_template-cred1-{{ test_id }}"
cred2: "AWX-Collection-tests-tower_job_template-cred2-{{ test_id }}"
cred3: "AWX-Collection-tests-tower_job_template-cred3-{{ test_id }}"
proj1: "AWX-Collection-tests-tower_job_template-proj-{{ test_id }}"
jt1: "AWX-Collection-tests-tower_job_template-jt1-{{ test_id }}"
jt2: "AWX-Collection-tests-tower_job_template-jt2-{{ test_id }}"
lab1: "AWX-Collection-tests-tower_job_template-lab1-{{ test_id }}"
email_not: "AWX-Collection-tests-tower_job_template-email-not-{{ test_id }}"
webhook_not: "AWX-Collection-tests-tower_notification_template-wehbook-not-{{ test_id }}"
group_name1: "AWX-Collection-tests-tower_instance_group-group1-{{ test_id }}"
org_name: "AWX-Collection-tests-organization-org-{{ test_id }}"
cred1: "AWX-Collection-tests-job_template-cred1-{{ test_id }}"
cred2: "AWX-Collection-tests-job_template-cred2-{{ test_id }}"
cred3: "AWX-Collection-tests-job_template-cred3-{{ test_id }}"
proj1: "AWX-Collection-tests-job_template-proj-{{ test_id }}"
jt1: "AWX-Collection-tests-job_template-jt1-{{ test_id }}"
jt2: "AWX-Collection-tests-job_template-jt2-{{ test_id }}"
lab1: "AWX-Collection-tests-job_template-lab1-{{ test_id }}"
email_not: "AWX-Collection-tests-job_template-email-not-{{ test_id }}"
webhook_not: "AWX-Collection-tests-notification_template-wehbook-not-{{ test_id }}"
group_name1: "AWX-Collection-tests-instance_group-group1-{{ test_id }}"
- name: "Create a new organization"
tower_organization:

View File

@ -1,8 +1,8 @@
---
- name: Generate random string for template and project
set_fact:
jt_name: "AWX-Collection-tests-tower_job_wait-long_running-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
proj_name: "AWX-Collection-tests-tower_job_wait-long_running-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
jt_name: "AWX-Collection-tests-job_wait-long_running-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
proj_name: "AWX-Collection-tests-job_wait-long_running-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Assure that the demo project exists
project:
@ -45,7 +45,7 @@
- assert:
that:
- "result.msg =='Unable to wait on job 99999999; that ID does not exist in Tower.' or
- "result.msg =='Unable to wait on job 99999999; that ID does not exist.' or
'min and max interval have been depricated, please use interval instead, interval will be set to 12'"
- name: Check module fails with correct msg
@ -58,7 +58,7 @@
that:
- result is failed
- "result.msg =='Unable to wait, no job_id 99999999 found: The requested object could not be found.' or
'Unable to wait on job 99999999; that ID does not exist in Tower.'"
'Unable to wait on job 99999999; that ID does not exist.'"
- name: Launch Demo Job Template (take happy path)
job_launch:
@ -136,7 +136,7 @@
organization: Default
state: absent
# tower workflow wait test
# workflow wait test
- name: Generate a random string for test
set_fact:
test_id1: "{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
@ -144,7 +144,7 @@
- name: Generate names
set_fact:
wfjt_name2: "AWX-Collection-tests-tower_workflow_launch--wfjt1-{{ test_id1 }}"
wfjt_name2: "AWX-Collection-tests-workflow_launch--wfjt1-{{ test_id1 }}"
- name: Create our workflow
workflow_job_template:

View File

@ -1,7 +1,7 @@
---
- name: Generate names
set_fact:
label_name: "AWX-Collection-tests-tower_label-label-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
label_name: "AWX-Collection-tests-label-label-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Create a Label
label:

View File

@ -7,21 +7,21 @@
- name: Generate usernames
set_fact:
usernames:
- "AWX-Collection-tests-tower_api_lookup-user1-{{ test_id }}"
- "AWX-Collection-tests-tower_api_lookup-user2-{{ test_id }}"
- "AWX-Collection-tests-tower_api_lookup-user3-{{ test_id }}"
- "AWX-Collection-tests-api_lookup-user1-{{ test_id }}"
- "AWX-Collection-tests-api_lookup-user2-{{ test_id }}"
- "AWX-Collection-tests-api_lookup-user3-{{ test_id }}"
hosts:
- "AWX-Collection-tests-tower_api_lookup-host1-{{ test_id }}"
- "AWX-Collection-tests-tower_api_lookup-host2-{{ test_id }}"
group_name: "AWX-Collection-tests-tower_api_lookup-group1-{{ test_id }}"
- "AWX-Collection-tests-api_lookup-host1-{{ test_id }}"
- "AWX-Collection-tests-api_lookup-host2-{{ test_id }}"
group_name: "AWX-Collection-tests-api_lookup-group1-{{ test_id }}"
- name: Get our collection package
controller_meta:
register: tower_meta
register: controller_meta
- name: Generate the name of our plugin
set_fact:
plugin_name: "{{ tower_meta.prefix }}.controller_api"
plugin_name: "{{ controller_meta.prefix }}.controller_api"
- name: Create all of our users
user:
@ -177,11 +177,11 @@
# DOCS Example Tests
- name: Load the UI settings
set_fact:
tower_settings: "{{ lookup('awx.awx.controller_api', 'settings/ui') }}"
controller_settings: "{{ lookup('awx.awx.controller_api', 'settings/ui') }}"
- assert:
that:
- "'CUSTOM_LOGO' in tower_settings"
- "'CUSTOM_LOGO' in controller_settings"
- name: Display the usernames of all admin users
debug:
@ -205,12 +205,12 @@
role: admin
user: "{{ usernames[0] }}"
state: absent
register: tower_role_revoke
register: role_revoke
when: "query('awx.awx.controller_api', 'users', query_params={ 'username': 'DNE_TESTING' }) | length == 1"
- assert:
that:
- tower_role_revoke is skipped
- role_revoke is skipped
- name: Create an inventory group with all 'foo' hosts
group:

View File

@ -1,12 +1,12 @@
---
- name: Generate names
set_fact:
slack_not: "AWX-Collection-tests-tower_notification_template-slack-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
webhook_not: "AWX-Collection-tests-tower_notification_template-wehbook-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
email_not: "AWX-Collection-tests-tower_notification_template-email-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
twillo_not: "AWX-Collection-tests-tower_notification_template-twillo-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
pd_not: "AWX-Collection-tests-tower_notification_template-pd-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
irc_not: "AWX-Collection-tests-tower_notification_template-irc-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
slack_not: "AWX-Collection-tests-notification_template-slack-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
webhook_not: "AWX-Collection-tests-notification_template-wehbook-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
email_not: "AWX-Collection-tests-notification_template-email-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
twillo_not: "AWX-Collection-tests-notification_template-twillo-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
pd_not: "AWX-Collection-tests-notification_template-pd-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
irc_not: "AWX-Collection-tests-notification_template-irc-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Test deprecation warnings with legacy name
notification_template:

View File

@ -5,8 +5,8 @@
- name: Generate an org name
set_fact:
org_name: "AWX-Collection-tests-tower_organization-org-{{ test_id }}"
group_name1: "AWX-Collection-tests-tower_instance_group-group1-{{ test_id }}"
org_name: "AWX-Collection-tests-organization-org-{{ test_id }}"
group_name1: "AWX-Collection-tests-instance_group-group1-{{ test_id }}"
- name: Make sure {{ org_name }} is not there
organization:

View File

@ -1,13 +1,13 @@
---
- name: Generate names
set_fact:
project_name1: "AWX-Collection-tests-tower_project-project1-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
project_name2: "AWX-Collection-tests-tower_project-project2-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
project_name3: "AWX-Collection-tests-tower_project-project3-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
jt1: "AWX-Collection-tests-tower_project-jt1-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
scm_cred_name: "AWX-Collection-tests-tower_project-scm-cred-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
org_name: "AWX-Collection-tests-tower_project-org-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
cred_name: "AWX-Collection-tests-tower_project-cred-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
project_name1: "AWX-Collection-tests-project-project1-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
project_name2: "AWX-Collection-tests-project-project2-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
project_name3: "AWX-Collection-tests-project-project3-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
jt1: "AWX-Collection-tests-project-jt1-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
scm_cred_name: "AWX-Collection-tests-project-scm-cred-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
org_name: "AWX-Collection-tests-project-org-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
cred_name: "AWX-Collection-tests-project-cred-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- block:
- name: Create an SCM Credential
@ -77,7 +77,7 @@
scm_credential: "{{ cred_name }}"
check_mode: true
- name: "Copy tower project from {{ project_name1 }}"
- name: "Copy project from {{ project_name1 }}"
project:
name: "{{ project_name2 }}"
copy_from: "{{ project_name1 }}"

View File

@ -1,9 +1,9 @@
---
- name: Load the UI settings
set_fact:
project_base_dir: "{{ tower_settings.project_base_dir }}"
project_base_dir: "{{ controller_settings.project_base_dir }}"
vars:
tower_settings: "{{ lookup('awx.awx.controller_api', 'config/') }}"
controller_settings: "{{ lookup('awx.awx.controller_api', 'config/') }}"
- inventory:
name: localhost

View File

@ -6,7 +6,7 @@
- name: Generate names
set_fact:
project_name1: "AWX-Collection-tests-tower_project_update-project-{{ test_id }}"
project_name1: "AWX-Collection-tests-project_update-project-{{ test_id }}"
- name: Create a git project without credentials without waiting
project:

View File

@ -5,11 +5,11 @@
- name: Generate names
set_fact:
username: "AWX-Collection-tests-tower_role-user-{{ test_id }}"
project_name: "AWX-Collection-tests-tower_role-project-1-{{ test_id }}"
jt1: "AWX-Collection-tests-tower_role-jt1-{{ test_id }}"
jt2: "AWX-Collection-tests-tower_role-jt2-{{ test_id }}"
wfjt_name: "AWX-Collection-tests-tower_role-project-wfjt-{{ test_id }}"
username: "AWX-Collection-tests-role-user-{{ test_id }}"
project_name: "AWX-Collection-tests-role-project-1-{{ test_id }}"
jt1: "AWX-Collection-tests-role-jt1-{{ test_id }}"
jt2: "AWX-Collection-tests-role-jt2-{{ test_id }}"
wfjt_name: "AWX-Collection-tests-role-project-wfjt-{{ test_id }}"
- block:
- name: Create a User

View File

@ -5,7 +5,7 @@
- name: generate random string for project
set_fact:
sched1: "AWX-Collection-tests-tower_schedule-sched1-{{ test_id }}"
sched1: "AWX-Collection-tests-schedule-sched1-{{ test_id }}"
- name: Try to create without an rrule
schedule:

View File

@ -1,11 +1,11 @@
---
- name: Get our collection package
controller_meta:
register: tower_meta
register: controller_meta
- name: Generate the name of our plugin
set_fact:
plugin_name: "{{ tower_meta.prefix }}.tower_schedule_rrule"
plugin_name: "{{ controller_meta.prefix }}.schedule_rrule"
- name: Test too many params (failure from validation of terms)
debug:

View File

@ -4,7 +4,7 @@
name: AWX_ISOLATION_SHOW_PATHS
value: '["/var/lib/awx/projects/"]'
- name: Set the value of AWX_ISOLATION_SHOW_PATHS to get an error back from Tower
- name: Set the value of AWX_ISOLATION_SHOW_PATHS to get an error back from the controller
settings:
settings:
AWX_ISOLATION_SHOW_PATHS:

View File

@ -1,9 +1,9 @@
---
- name: Generate names
set_fact:
team_name: "AWX-Collection-tests-tower_team-team-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
team_name: "AWX-Collection-tests-team-team-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Attempt to add a Tower team to a non-existant Organization
- name: Attempt to add a team to a non-existant Organization
team:
name: Test Team
organization: Missing_Organization
@ -11,7 +11,7 @@
register: result
ignore_errors: true
- name: Assert a meaningful error was provided for the failed Tower team creation
- name: Assert a meaningful error was provided for the failed team creation
assert:
that:
- "result is failed"
@ -19,7 +19,7 @@
- "'Missing_Organization' in result.msg"
- "result.total_results == 0"
- name: Create a Tower team
- name: Create a team
team:
name: "{{ team_name }}"
organization: Default
@ -29,7 +29,7 @@
that:
- "result is changed"
- name: Delete a Tower team
- name: Delete a team
team:
name: "{{ team_name }}"
organization: Default

View File

@ -1,7 +1,7 @@
---
- name: Generate names
set_fact:
token_description: "AWX-Collection-tests-tower_token-description-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
token_description: "AWX-Collection-tests-token-description-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Try to use a token as a dict which is missing the token parameter
job_list:

View File

@ -1,7 +1,7 @@
---
- name: Generate names
set_fact:
username: "AWX-Collection-tests-tower_user-user-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
username: "AWX-Collection-tests-user-user-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Create a User
user:
@ -101,7 +101,7 @@
that:
- "result is changed"
- name: Test tower SSL parameter
- name: Test SSL parameter
user:
first_name: Joe
last_name: User

View File

@ -5,18 +5,18 @@
- name: Generate random names for test objects
set_fact:
org_name: "AWX-Collection-tests-tower_organization-org-{{ test_id }}"
scm_cred_name: "AWX-Collection-tests-tower_workflow_job_template-scm-cred-{{ test_id }}"
demo_project_name: "AWX-Collection-tests-tower_workflow_job_template-proj-{{ test_id }}"
jt1_name: "AWX-Collection-tests-tower_workflow_job_template-jt1-{{ test_id }}"
jt2_name: "AWX-Collection-tests-tower_workflow_job_template-jt2-{{ test_id }}"
approval_node_name: "AWX-Collection-tests-tower_workflow_approval_node-{{ test_id }}"
lab1: "AWX-Collection-tests-tower_job_template-lab1-{{ test_id }}"
wfjt_name: "AWX-Collection-tests-tower_workflow_job_template-wfjt-{{ test_id }}"
email_not: "AWX-Collection-tests-tower_job_template-email-not-{{ test_id }}"
webhook_not: "AWX-Collection-tests-tower_notification_template-wehbook-not-{{ test_id }}"
project_inv: "AWX-Collection-tests-tower_inventory_source-inv-project-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
project_inv_source: "AWX-Collection-tests-tower_inventory_source-inv-source-project-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
org_name: "AWX-Collection-tests-organization-org-{{ test_id }}"
scm_cred_name: "AWX-Collection-tests-workflow_job_template-scm-cred-{{ test_id }}"
demo_project_name: "AWX-Collection-tests-workflow_job_template-proj-{{ test_id }}"
jt1_name: "AWX-Collection-tests-workflow_job_template-jt1-{{ test_id }}"
jt2_name: "AWX-Collection-tests-workflow_job_template-jt2-{{ test_id }}"
approval_node_name: "AWX-Collection-tests-workflow_approval_node-{{ test_id }}"
lab1: "AWX-Collection-tests-job_template-lab1-{{ test_id }}"
wfjt_name: "AWX-Collection-tests-workflow_job_template-wfjt-{{ test_id }}"
email_not: "AWX-Collection-tests-job_template-email-not-{{ test_id }}"
webhook_not: "AWX-Collection-tests-notification_template-wehbook-not-{{ test_id }}"
project_inv: "AWX-Collection-tests-inventory_source-inv-project-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
project_inv_source: "AWX-Collection-tests-inventory_source-inv-source-project-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: "Create a new organization"
tower_organization:
@ -85,7 +85,7 @@
that:
- "result is changed"
- name: Add a Tower inventory
- name: Add an inventory
inventory:
description: Test inventory
organization: Default

View File

@ -6,9 +6,9 @@
- name: Generate names
set_fact:
wfjt_name1: "AWX-Collection-tests-tower_workflow_launch--wfjt1-{{ test_id }}"
wfjt_name2: "AWX-Collection-tests-tower_workflow_launch--wfjt1-{{ test_id }}-2"
approval_node_name: "AWX-Collection-tests-tower_workflow_launch_approval_node-{{ test_id }}"
wfjt_name1: "AWX-Collection-tests-workflow_launch--wfjt1-{{ test_id }}"
wfjt_name2: "AWX-Collection-tests-workflow_launch--wfjt1-{{ test_id }}-2"
approval_node_name: "AWX-Collection-tests-workflow_launch_approval_node-{{ test_id }}"
- block:
@ -24,7 +24,7 @@
identifier: leaf
register: new_node
- name: Connect to Tower server but request an invalid workflow
- name: Connect to controller server but request an invalid workflow
workflow_launch:
workflow_template: "Does Not Exist"
ignore_errors: true
@ -176,7 +176,7 @@
unified_job_template: "Demo Job Template"
identifier: leaf
# Test tower_workflow_approval and tower_workflow_node_wait
# Test workflow_approval and workflow_node_wait
- name: Create approval node
workflow_job_template_node:
identifier: approval_test

View File

@ -13,7 +13,7 @@
authors:
- AWX Project Contributors <awx-project@googlegroups.com>
dependencies: {}
description: Ansible content that interacts with the AWX or Ansible Tower API.
description: Ansible content that interacts with the AWX or Automation Platform Controller API.
documentation: https://github.com/ansible/awx/blob/devel/awx_collection/README.md
homepage: https://www.ansible.com/
issues: https://github.com/ansible/awx/issues?q=is%3Aissue+label%3Acomponent%3Aawx_collection

View File

@ -1,8 +1,8 @@
---
examples:
users: |
- name: Add tower user
tower_user:
- name: Add user
user:
username: jdoe
password: foobarbaz
email: jdoe@example.org
@ -11,8 +11,8 @@ examples:
state: present
tower_config_file: "~/tower_cli.cfg"
- name: Add tower user as a system administrator
tower_user:
- name: Add user as a system administrator
user:
username: jdoe
password: foobarbaz
email: jdoe@example.org
@ -20,8 +20,8 @@ examples:
state: present
tower_config_file: "~/tower_cli.cfg"
- name: Add tower user as a system auditor
tower_user:
- name: Add user as a system auditor
user:
username: jdoe
password: foobarbaz
email: jdoe@example.org
@ -29,16 +29,16 @@ examples:
state: present
tower_config_file: "~/tower_cli.cfg"
- name: Delete tower user
tower_user:
- name: Delete user
user:
username: jdoe
email: jdoe@example.org
state: absent
tower_config_file: "~/tower_cli.cfg"
job_templates: |
- name: Create tower Ping job template
tower_job_template:
- name: Create Ping job template
job_template:
name: "Ping"
job_type: "run"
inventory: "Local"