From 82c5803e595b6443c0e1e50937f76b615e24cc70 Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Mon, 3 May 2021 17:20:24 -0400 Subject: [PATCH] mostly includes renaming non-syntax references to tower --- awx_collection/TESTING.md | 26 +++++++------- awx_collection/galaxy.yml | 2 +- awx_collection/plugins/doc_fragments/auth.py | 20 +++++------ .../plugins/doc_fragments/auth_legacy.py | 16 ++++----- .../plugins/doc_fragments/auth_plugin.py | 16 ++++----- .../plugins/inventory/controller.py | 24 ++++++------- .../plugins/lookup/controller_api.py | 14 ++++---- .../plugins/lookup/schedule_rrule.py | 10 +++--- .../plugins/module_utils/controller_api.py | 22 ++++++------ .../plugins/module_utils/tower_legacy.py | 2 +- .../plugins/modules/ad_hoc_command.py | 6 ++-- .../plugins/modules/ad_hoc_command_cancel.py | 8 ++--- .../plugins/modules/ad_hoc_command_wait.py | 8 ++--- awx_collection/plugins/modules/application.py | 4 +-- awx_collection/plugins/modules/credential.py | 20 +++++------ .../modules/credential_input_source.py | 4 +-- .../plugins/modules/credential_type.py | 10 +++--- .../plugins/modules/execution_environment.py | 6 ++-- awx_collection/plugins/modules/export.py | 8 ++--- awx_collection/plugins/modules/group.py | 12 +++---- awx_collection/plugins/modules/host.py | 6 ++-- awx_collection/plugins/modules/import.py | 8 ++--- .../plugins/modules/instance_group.py | 4 +-- awx_collection/plugins/modules/inventory.py | 8 ++--- .../plugins/modules/inventory_source.py | 6 ++-- .../modules/inventory_source_update.py | 4 +-- awx_collection/plugins/modules/job_cancel.py | 6 ++-- awx_collection/plugins/modules/job_launch.py | 8 ++--- awx_collection/plugins/modules/job_list.py | 4 +-- .../plugins/modules/job_template.py | 12 +++---- awx_collection/plugins/modules/job_wait.py | 12 +++---- awx_collection/plugins/modules/label.py | 8 ++--- awx_collection/plugins/modules/license.py | 4 +-- .../plugins/modules/notification_template.py | 4 +-- .../plugins/modules/organization.py | 10 +++--- awx_collection/plugins/modules/project.py | 12 +++---- .../plugins/modules/project_update.py | 6 ++-- awx_collection/plugins/modules/receive.py | 6 ++-- awx_collection/plugins/modules/role.py | 4 +-- awx_collection/plugins/modules/schedule.py | 6 ++-- awx_collection/plugins/modules/send.py | 6 ++-- awx_collection/plugins/modules/settings.py | 4 +-- awx_collection/plugins/modules/team.py | 6 ++-- awx_collection/plugins/modules/token.py | 10 +++--- awx_collection/plugins/modules/user.py | 12 +++---- .../plugins/modules/workflow_approval.py | 2 +- .../plugins/modules/workflow_job_template.py | 6 ++-- .../modules/workflow_job_template_node.py | 10 +++--- .../plugins/modules/workflow_launch.py | 6 ++-- .../plugins/modules/workflow_node_wait.py | 2 +- .../plugins/modules/workflow_template.py | 4 +-- awx_collection/test/awx/test_ad_hoc_wait.py | 2 +- awx_collection/test/awx/test_completeness.py | 8 ++--- awx_collection/test/awx/test_group.py | 2 +- awx_collection/test/awx/test_job.py | 2 +- awx_collection/test/awx/test_module_utils.py | 18 +++++----- .../targets/ad_hoc_command/tasks/main.yml | 6 ++-- .../ad_hoc_command_cancel/tasks/main.yml | 6 ++-- .../ad_hoc_command_wait/tasks/main.yml | 8 ++--- .../targets/application/tasks/main.yml | 6 ++-- .../targets/credential/tasks/main.yml | 34 +++++++++---------- .../credential_input_source/tasks/main.yml | 18 +++++----- .../targets/credential_type/tasks/main.yml | 2 +- .../integration/targets/export/tasks/main.yml | 8 ++--- .../integration/targets/group/tasks/main.yml | 14 ++++---- .../integration/targets/host/tasks/main.yml | 4 +-- .../integration/targets/import/tasks/main.yml | 4 +-- .../targets/instance_group/tasks/main.yml | 6 ++-- .../targets/inventory/tasks/main.yml | 8 ++--- .../targets/inventory_source/tasks/main.yml | 10 +++--- .../inventory_source_update/tasks/main.yml | 12 +++---- .../targets/job_launch/tasks/main.yml | 6 ++-- .../targets/job_template/tasks/main.yml | 22 ++++++------ .../targets/job_wait/tasks/main.yml | 12 +++---- .../integration/targets/label/tasks/main.yml | 2 +- .../targets/lookup_api_plugin/tasks/main.yml | 24 ++++++------- .../notification_template/tasks/main.yml | 12 +++---- .../targets/organization/tasks/main.yml | 4 +-- .../targets/project/tasks/main.yml | 16 ++++----- .../tasks/create_project_dir.yml | 4 +-- .../targets/project_update/tasks/main.yml | 2 +- .../integration/targets/role/tasks/main.yml | 10 +++--- .../targets/schedule/tasks/main.yml | 2 +- .../targets/schedule_rrule/tasks/main.yml | 4 +-- .../targets/settings/tasks/main.yml | 2 +- .../integration/targets/team/tasks/main.yml | 10 +++--- .../integration/targets/token/tasks/main.yml | 2 +- .../integration/targets/user/tasks/main.yml | 4 +-- .../workflow_job_template/tasks/main.yml | 26 +++++++------- .../targets/workflow_launch/tasks/main.yml | 10 +++--- .../template_galaxy/templates/galaxy.yml.j2 | 2 +- awx_collection/tools/vars/examples.yml | 20 +++++------ 92 files changed, 410 insertions(+), 408 deletions(-) diff --git a/awx_collection/TESTING.md b/awx_collection/TESTING.md index 23a01c7ad5..0ecf99c26e 100644 --- a/awx_collection/TESTING.md +++ b/awx_collection/TESTING.md @@ -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. diff --git a/awx_collection/galaxy.yml b/awx_collection/galaxy.yml index 15ae9cdcbb..b995bfe3e8 100644 --- a/awx_collection/galaxy.yml +++ b/awx_collection/galaxy.yml @@ -13,7 +13,7 @@ authors: - AWX Project Contributors 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 diff --git a/awx_collection/plugins/doc_fragments/auth.py b/awx_collection/plugins/doc_fragments/auth.py index cc8d449bad..90869d1159 100644 --- a/awx_collection/plugins/doc_fragments/auth.py +++ b/awx_collection/plugins/doc_fragments/auth.py @@ -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 diff --git a/awx_collection/plugins/doc_fragments/auth_legacy.py b/awx_collection/plugins/doc_fragments/auth_legacy.py index dcece09976..9ce9aab82b 100644 --- a/awx_collection/plugins/doc_fragments/auth_legacy.py +++ b/awx_collection/plugins/doc_fragments/auth_legacy.py @@ -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 diff --git a/awx_collection/plugins/doc_fragments/auth_plugin.py b/awx_collection/plugins/doc_fragments/auth_plugin.py index 207100c193..06214bdcc6 100644 --- a/awx_collection/plugins/doc_fragments/auth_plugin.py +++ b/awx_collection/plugins/doc_fragments/auth_plugin.py @@ -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 diff --git a/awx_collection/plugins/inventory/controller.py b/awx_collection/plugins/inventory/controller.py index 1272d1b587..c3d24cd810 100644 --- a/awx_collection/plugins/inventory/controller.py +++ b/awx_collection/plugins/inventory/controller.py @@ -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 diff --git a/awx_collection/plugins/lookup/controller_api.py b/awx_collection/plugins/lookup/controller_api.py index 51657755b4..90dcaebfdf 100644 --- a/awx_collection/plugins/lookup/controller_api.py +++ b/awx_collection/plugins/lookup/controller_api.py @@ -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: >- diff --git a/awx_collection/plugins/lookup/schedule_rrule.py b/awx_collection/plugins/lookup/schedule_rrule.py index 9876be153b..4b5dd7fe73 100644 --- a/awx_collection/plugins/lookup/schedule_rrule.py +++ b/awx_collection/plugins/lookup/schedule_rrule.py @@ -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) diff --git a/awx_collection/plugins/module_utils/controller_api.py b/awx_collection/plugins/module_utils/controller_api.py index 4a5de0f55e..b655c261da 100644 --- a/awx_collection/plugins/module_utils/controller_api.py +++ b/awx_collection/plugins/module_utils/controller_api.py @@ -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: diff --git a/awx_collection/plugins/module_utils/tower_legacy.py b/awx_collection/plugins/module_utils/tower_legacy.py index 9e92e6429b..e184ac0f05 100644 --- a/awx_collection/plugins/module_utils/tower_legacy.py +++ b/awx_collection/plugins/module_utils/tower_legacy.py @@ -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() diff --git a/awx_collection/plugins/modules/ad_hoc_command.py b/awx_collection/plugins/modules/ad_hoc_command.py index ae04b00963..355e60362b 100644 --- a/awx_collection/plugins/modules/ad_hoc_command.py +++ b/awx_collection/plugins/modules/ad_hoc_command.py @@ -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: diff --git a/awx_collection/plugins/modules/ad_hoc_command_cancel.py b/awx_collection/plugins/modules/ad_hoc_command_cancel.py index 40e51d93f2..147ce838d1 100644 --- a/awx_collection/plugins/modules/ad_hoc_command_cancel.py +++ b/awx_collection/plugins/modules/ad_hoc_command_cancel.py @@ -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 ''' diff --git a/awx_collection/plugins/modules/ad_hoc_command_wait.py b/awx_collection/plugins/modules/ad_hoc_command_wait.py index f547b93c06..5084d4a075 100644 --- a/awx_collection/plugins/modules/ad_hoc_command_wait.py +++ b/awx_collection/plugins/modules/ad_hoc_command_wait.py @@ -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) diff --git a/awx_collection/plugins/modules/application.py b/awx_collection/plugins/modules/application.py index c8602a3281..d12d15a171 100644 --- a/awx_collection/plugins/modules/application.py +++ b/awx_collection/plugins/modules/application.py @@ -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: diff --git a/awx_collection/plugins/modules/credential.py b/awx_collection/plugins/modules/credential.py index 9cc84f6e72..6675f191cf 100644 --- a/awx_collection/plugins/modules/credential.py +++ b/awx_collection/plugins/modules/credential.py @@ -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 diff --git a/awx_collection/plugins/modules/credential_input_source.py b/awx_collection/plugins/modules/credential_input_source.py index de1b8e25e2..4d57c4bf90 100644 --- a/awx_collection/plugins/modules/credential_input_source.py +++ b/awx_collection/plugins/modules/credential_input_source.py @@ -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: diff --git a/awx_collection/plugins/modules/credential_type.py b/awx_collection/plugins/modules/credential_type.py index 7dff67bc5f..f9c4d4985a 100644 --- a/awx_collection/plugins/modules/credential_type.py +++ b/awx_collection/plugins/modules/credential_type.py @@ -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: diff --git a/awx_collection/plugins/modules/execution_environment.py b/awx_collection/plugins/modules/execution_environment.py index a419b0697b..a67532d3b6 100644 --- a/awx_collection/plugins/modules/execution_environment.py +++ b/awx_collection/plugins/modules/execution_environment.py @@ -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 diff --git a/awx_collection/plugins/modules/export.py b/awx_collection/plugins/modules/export.py index c50632ee6b..f45bbd870d 100644 --- a/awx_collection/plugins/modules/export.py +++ b/awx_collection/plugins/modules/export.py @@ -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: diff --git a/awx_collection/plugins/modules/group.py b/awx_collection/plugins/modules/group.py index 8a9fe46673..752fe4891a 100644 --- a/awx_collection/plugins/modules/group.py +++ b/awx_collection/plugins/modules/group.py @@ -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" diff --git a/awx_collection/plugins/modules/host.py b/awx_collection/plugins/modules/host.py index edb343e1de..ee7f6899b1 100644 --- a/awx_collection/plugins/modules/host.py +++ b/awx_collection/plugins/modules/host.py @@ -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" diff --git a/awx_collection/plugins/modules/import.py b/awx_collection/plugins/modules/import.py index b88ae41d59..c1e741ed77 100644 --- a/awx_collection/plugins/modules/import.py +++ b/awx_collection/plugins/modules/import.py @@ -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 }}" diff --git a/awx_collection/plugins/modules/instance_group.py b/awx_collection/plugins/modules/instance_group.py index 37246d5e60..4b7713d16c 100644 --- a/awx_collection/plugins/modules/instance_group.py +++ b/awx_collection/plugins/modules/instance_group.py @@ -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: diff --git a/awx_collection/plugins/modules/inventory.py b/awx_collection/plugins/modules/inventory.py index 4f4d6ac833..8b63983b3f 100644 --- a/awx_collection/plugins/modules/inventory.py +++ b/awx_collection/plugins/modules/inventory.py @@ -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 diff --git a/awx_collection/plugins/modules/inventory_source.py b/awx_collection/plugins/modules/inventory_source.py index 65168c321b..86882c5a11 100644 --- a/awx_collection/plugins/modules/inventory_source.py +++ b/awx_collection/plugins/modules/inventory_source.py @@ -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(), diff --git a/awx_collection/plugins/modules/inventory_source_update.py b/awx_collection/plugins/modules/inventory_source_update.py index 07aca6dca4..ebdd7ca9cc 100644 --- a/awx_collection/plugins/modules/inventory_source_update.py +++ b/awx_collection/plugins/modules/inventory_source_update.py @@ -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 diff --git a/awx_collection/plugins/modules/job_cancel.py b/awx_collection/plugins/modules/job_cancel.py index 5a2d071ef3..a987b7bec5 100644 --- a/awx_collection/plugins/modules/job_cancel.py +++ b/awx_collection/plugins/modules/job_cancel.py @@ -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: diff --git a/awx_collection/plugins/modules/job_launch.py b/awx_collection/plugins/modules/job_launch.py index 52edec1762..193e2c1e61 100644 --- a/awx_collection/plugins/modules/job_launch.py +++ b/awx_collection/plugins/modules/job_launch.py @@ -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: diff --git a/awx_collection/plugins/modules/job_list.py b/awx_collection/plugins/modules/job_list.py index 831b722c69..61cf6c3418 100644 --- a/awx_collection/plugins/modules/job_list.py +++ b/awx_collection/plugins/modules/job_list.py @@ -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: diff --git a/awx_collection/plugins/modules/job_template.py b/awx_collection/plugins/modules/job_template.py index 24711cfd4c..2bae27bb64 100644 --- a/awx_collection/plugins/modules/job_template.py +++ b/awx_collection/plugins/modules/job_template.py @@ -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) diff --git a/awx_collection/plugins/modules/job_wait.py b/awx_collection/plugins/modules/job_wait.py index 4c10adffed..110bffc3c4 100644 --- a/awx_collection/plugins/modules/job_wait.py +++ b/awx_collection/plugins/modules/job_wait.py @@ -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) diff --git a/awx_collection/plugins/modules/label.py b/awx_collection/plugins/modules/label.py index c37c0335b2..b17d58beec 100644 --- a/awx_collection/plugins/modules/label.py +++ b/awx_collection/plugins/modules/label.py @@ -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 diff --git a/awx_collection/plugins/modules/license.py b/awx_collection/plugins/modules/license.py index c8e3670d46..9325fc0359 100644 --- a/awx_collection/plugins/modules/license.py +++ b/awx_collection/plugins/modules/license.py @@ -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: diff --git a/awx_collection/plugins/modules/notification_template.py b/awx_collection/plugins/modules/notification_template.py index 78a0d6e147..c959b89cad 100644 --- a/awx_collection/plugins/modules/notification_template.py +++ b/awx_collection/plugins/modules/notification_template.py @@ -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: diff --git a/awx_collection/plugins/modules/organization.py b/awx_collection/plugins/modules/organization.py index ef255b859b..fd45452509 100644 --- a/awx_collection/plugins/modules/organization.py +++ b/awx_collection/plugins/modules/organization.py @@ -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 diff --git a/awx_collection/plugins/modules/project.py b/awx_collection/plugins/modules/project.py index e3e296490c..0f6f68ce2c 100644 --- a/awx_collection/plugins/modules/project.py +++ b/awx_collection/plugins/modules/project.py @@ -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 diff --git a/awx_collection/plugins/modules/project_update.py b/awx_collection/plugins/modules/project_update.py index 9931b9766f..480fe98d8f 100644 --- a/awx_collection/plugins/modules/project_update.py +++ b/awx_collection/plugins/modules/project_update.py @@ -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 diff --git a/awx_collection/plugins/modules/receive.py b/awx_collection/plugins/modules/receive.py index 194bd6d347..e941b648ec 100644 --- a/awx_collection/plugins/modules/receive.py +++ b/awx_collection/plugins/modules/receive.py @@ -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" diff --git a/awx_collection/plugins/modules/role.py b/awx_collection/plugins/modules/role.py index 915a0b4fc6..211117ee34 100644 --- a/awx_collection/plugins/modules/role.py +++ b/awx_collection/plugins/modules/role.py @@ -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: diff --git a/awx_collection/plugins/modules/schedule.py b/awx_collection/plugins/modules/schedule.py index b2c06277a5..e9037cada7 100644 --- a/awx_collection/plugins/modules/schedule.py +++ b/awx_collection/plugins/modules/schedule.py @@ -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 ''' diff --git a/awx_collection/plugins/modules/send.py b/awx_collection/plugins/modules/send.py index 1b06829b8f..2f5588a7e9 100644 --- a/awx_collection/plugins/modules/send.py +++ b/awx_collection/plugins/modules/send.py @@ -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" diff --git a/awx_collection/plugins/modules/settings.py b/awx_collection/plugins/modules/settings.py index e77dd69a29..56c0b94e5a 100644 --- a/awx_collection/plugins/modules/settings.py +++ b/awx_collection/plugins/modules/settings.py @@ -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: diff --git a/awx_collection/plugins/modules/team.py b/awx_collection/plugins/modules/team.py index ce51519b67..e66d541e8a 100644 --- a/awx_collection/plugins/modules/team.py +++ b/awx_collection/plugins/modules/team.py @@ -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 diff --git a/awx_collection/plugins/modules/token.py b/awx_collection/plugins/modules/token.py index 2f5bf2ffe3..c49c4f8f67 100644 --- a/awx_collection/plugins/modules/token.py +++ b/awx_collection/plugins/modules/token.py @@ -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. diff --git a/awx_collection/plugins/modules/user.py b/awx_collection/plugins/modules/user.py index ca8ba710b8..befb48e732 100644 --- a/awx_collection/plugins/modules/user.py +++ b/awx_collection/plugins/modules/user.py @@ -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 diff --git a/awx_collection/plugins/modules/workflow_approval.py b/awx_collection/plugins/modules/workflow_approval.py index 07fb1f82eb..bb8c24dfb8 100644 --- a/awx_collection/plugins/modules/workflow_approval.py +++ b/awx_collection/plugins/modules/workflow_approval.py @@ -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 diff --git a/awx_collection/plugins/modules/workflow_job_template.py b/awx_collection/plugins/modules/workflow_job_template.py index 5b42e95a9e..741397b99f 100644 --- a/awx_collection/plugins/modules/workflow_job_template.py +++ b/awx_collection/plugins/modules/workflow_job_template.py @@ -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: diff --git a/awx_collection/plugins/modules/workflow_job_template_node.py b/awx_collection/plugins/modules/workflow_job_template_node.py index ec841d2abd..9c950d3465 100644 --- a/awx_collection/plugins/modules/workflow_job_template_node.py +++ b/awx_collection/plugins/modules/workflow_job_template_node.py @@ -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 diff --git a/awx_collection/plugins/modules/workflow_launch.py b/awx_collection/plugins/modules/workflow_launch.py index f3854116b5..aa626c7861 100644 --- a/awx_collection/plugins/modules/workflow_launch.py +++ b/awx_collection/plugins/modules/workflow_launch.py @@ -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 diff --git a/awx_collection/plugins/modules/workflow_node_wait.py b/awx_collection/plugins/modules/workflow_node_wait.py index a8b4abaf43..3fdeed46ae 100644 --- a/awx_collection/plugins/modules/workflow_node_wait.py +++ b/awx_collection/plugins/modules/workflow_node_wait.py @@ -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 diff --git a/awx_collection/plugins/modules/workflow_template.py b/awx_collection/plugins/modules/workflow_template.py index 05654c377d..f100ee46f2 100644 --- a/awx_collection/plugins/modules/workflow_template.py +++ b/awx_collection/plugins/modules/workflow_template.py @@ -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 diff --git a/awx_collection/test/awx/test_ad_hoc_wait.py b/awx_collection/test/awx/test_ad_hoc_wait.py index c55b5e32b3..fb23d7ce77 100644 --- a/awx_collection/test/awx/test_ad_hoc_wait.py +++ b/awx_collection/test/awx/test_ad_hoc_wait.py @@ -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."} diff --git a/awx_collection/test/awx/test_completeness.py b/awx_collection/test/awx/test_completeness.py index a2667d9cd6..cb82255ea2 100644 --- a/awx_collection/test/awx/test_completeness.py +++ b/awx_collection/test/awx/test_completeness.py @@ -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'], } diff --git a/awx_collection/test/awx/test_group.py b/awx_collection/test/awx/test_group.py index 295a72cabd..aae7af5796 100644 --- a/awx_collection/test/awx/test_group.py +++ b/awx_collection/test/awx/test_group.py @@ -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) diff --git a/awx_collection/test/awx/test_job.py b/awx_collection/test/awx/test_job.py index 3d25353e9b..1731ef3553 100644 --- a/awx_collection/test/awx/test_job.py +++ b/awx_collection/test/awx/test_job.py @@ -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."} diff --git a/awx_collection/test/awx/test_module_utils.py b/awx_collection/test/awx/test_module_utils.py index e261a74251..000a5e7809 100644 --- a/awx_collection/test/awx/test_module_utils.py +++ b/awx_collection/test/awx/test_module_utils.py @@ -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.' ) diff --git a/awx_collection/tests/integration/targets/ad_hoc_command/tasks/main.yml b/awx_collection/tests/integration/targets/ad_hoc_command/tasks/main.yml index b5e8a9f529..316315df30 100644 --- a/awx_collection/tests/integration/targets/ad_hoc_command/tasks/main.yml +++ b/awx_collection/tests/integration/targets/ad_hoc_command/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/ad_hoc_command_cancel/tasks/main.yml b/awx_collection/tests/integration/targets/ad_hoc_command_cancel/tasks/main.yml index 716bd1507c..282c596d28 100644 --- a/awx_collection/tests/integration/targets/ad_hoc_command_cancel/tasks/main.yml +++ b/awx_collection/tests/integration/targets/ad_hoc_command_cancel/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/ad_hoc_command_wait/tasks/main.yml b/awx_collection/tests/integration/targets/ad_hoc_command_wait/tasks/main.yml index e92627c810..941774874f 100644 --- a/awx_collection/tests/integration/targets/ad_hoc_command_wait/tasks/main.yml +++ b/awx_collection/tests/integration/targets/ad_hoc_command_wait/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/application/tasks/main.yml b/awx_collection/tests/integration/targets/application/tasks/main.yml index fadc044cee..ca3c212e03 100644 --- a/awx_collection/tests/integration/targets/application/tasks/main.yml +++ b/awx_collection/tests/integration/targets/application/tasks/main.yml @@ -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 diff --git a/awx_collection/tests/integration/targets/credential/tasks/main.yml b/awx_collection/tests/integration/targets/credential/tasks/main.yml index 4b5328330a..cbd23c0c76 100644 --- a/awx_collection/tests/integration/targets/credential/tasks/main.yml +++ b/awx_collection/tests/integration/targets/credential/tasks/main.yml @@ -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 diff --git a/awx_collection/tests/integration/targets/credential_input_source/tasks/main.yml b/awx_collection/tests/integration/targets/credential_input_source/tasks/main.yml index 83fc112e76..03557ee0e1 100644 --- a/awx_collection/tests/integration/targets/credential_input_source/tasks/main.yml +++ b/awx_collection/tests/integration/targets/credential_input_source/tasks/main.yml @@ -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 diff --git a/awx_collection/tests/integration/targets/credential_type/tasks/main.yml b/awx_collection/tests/integration/targets/credential_type/tasks/main.yml index bf4bb19933..903cd7d5cc 100644 --- a/awx_collection/tests/integration/targets/credential_type/tasks/main.yml +++ b/awx_collection/tests/integration/targets/credential_type/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/export/tasks/main.yml b/awx_collection/tests/integration/targets/export/tasks/main.yml index be06a0976a..d051b3ee68 100644 --- a/awx_collection/tests/integration/targets/export/tasks/main.yml +++ b/awx_collection/tests/integration/targets/export/tasks/main.yml @@ -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 diff --git a/awx_collection/tests/integration/targets/group/tasks/main.yml b/awx_collection/tests/integration/targets/group/tasks/main.yml index 313cb55ae4..ac58826b17 100644 --- a/awx_collection/tests/integration/targets/group/tasks/main.yml +++ b/awx_collection/tests/integration/targets/group/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/host/tasks/main.yml b/awx_collection/tests/integration/targets/host/tasks/main.yml index 185412c180..a0321b09cb 100644 --- a/awx_collection/tests/integration/targets/host/tasks/main.yml +++ b/awx_collection/tests/integration/targets/host/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/import/tasks/main.yml b/awx_collection/tests/integration/targets/import/tasks/main.yml index 818fe4ee3c..9e0ac0fdc3 100644 --- a/awx_collection/tests/integration/targets/import/tasks/main.yml +++ b/awx_collection/tests/integration/targets/import/tasks/main.yml @@ -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" diff --git a/awx_collection/tests/integration/targets/instance_group/tasks/main.yml b/awx_collection/tests/integration/targets/instance_group/tasks/main.yml index 8d526d7fd7..701137f28c 100644 --- a/awx_collection/tests/integration/targets/instance_group/tasks/main.yml +++ b/awx_collection/tests/integration/targets/instance_group/tasks/main.yml @@ -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 diff --git a/awx_collection/tests/integration/targets/inventory/tasks/main.yml b/awx_collection/tests/integration/targets/inventory/tasks/main.yml index 0171f9a0b9..0906372c45 100644 --- a/awx_collection/tests/integration/targets/inventory/tasks/main.yml +++ b/awx_collection/tests/integration/targets/inventory/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/inventory_source/tasks/main.yml b/awx_collection/tests/integration/targets/inventory_source/tasks/main.yml index 56abbb0afa..a1654bf25b 100644 --- a/awx_collection/tests/integration/targets/inventory_source/tasks/main.yml +++ b/awx_collection/tests/integration/targets/inventory_source/tasks/main.yml @@ -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 diff --git a/awx_collection/tests/integration/targets/inventory_source_update/tasks/main.yml b/awx_collection/tests/integration/targets/inventory_source_update/tasks/main.yml index 435770302a..8af4d5589c 100644 --- a/awx_collection/tests/integration/targets/inventory_source_update/tasks/main.yml +++ b/awx_collection/tests/integration/targets/inventory_source_update/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/job_launch/tasks/main.yml b/awx_collection/tests/integration/targets/job_launch/tasks/main.yml index 9d98c9fe36..178ab84e3e 100644 --- a/awx_collection/tests/integration/targets/job_launch/tasks/main.yml +++ b/awx_collection/tests/integration/targets/job_launch/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/job_template/tasks/main.yml b/awx_collection/tests/integration/targets/job_template/tasks/main.yml index 7dd1daad86..9cbc5b9c2a 100644 --- a/awx_collection/tests/integration/targets/job_template/tasks/main.yml +++ b/awx_collection/tests/integration/targets/job_template/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/job_wait/tasks/main.yml b/awx_collection/tests/integration/targets/job_wait/tasks/main.yml index 5187dc7da8..1e6afab09c 100644 --- a/awx_collection/tests/integration/targets/job_wait/tasks/main.yml +++ b/awx_collection/tests/integration/targets/job_wait/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/label/tasks/main.yml b/awx_collection/tests/integration/targets/label/tasks/main.yml index fbb4c3e00f..0ac077f8ca 100644 --- a/awx_collection/tests/integration/targets/label/tasks/main.yml +++ b/awx_collection/tests/integration/targets/label/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/lookup_api_plugin/tasks/main.yml b/awx_collection/tests/integration/targets/lookup_api_plugin/tasks/main.yml index b9be9607b0..7ecfa84a8c 100644 --- a/awx_collection/tests/integration/targets/lookup_api_plugin/tasks/main.yml +++ b/awx_collection/tests/integration/targets/lookup_api_plugin/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/notification_template/tasks/main.yml b/awx_collection/tests/integration/targets/notification_template/tasks/main.yml index 89514b3598..fdec155d41 100644 --- a/awx_collection/tests/integration/targets/notification_template/tasks/main.yml +++ b/awx_collection/tests/integration/targets/notification_template/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/organization/tasks/main.yml b/awx_collection/tests/integration/targets/organization/tasks/main.yml index 5769d7c9b9..50e6e7b2d1 100644 --- a/awx_collection/tests/integration/targets/organization/tasks/main.yml +++ b/awx_collection/tests/integration/targets/organization/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/project/tasks/main.yml b/awx_collection/tests/integration/targets/project/tasks/main.yml index 8a6f36ac24..61e51dd887 100644 --- a/awx_collection/tests/integration/targets/project/tasks/main.yml +++ b/awx_collection/tests/integration/targets/project/tasks/main.yml @@ -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 }}" diff --git a/awx_collection/tests/integration/targets/project_manual/tasks/create_project_dir.yml b/awx_collection/tests/integration/targets/project_manual/tasks/create_project_dir.yml index 44c5648fb3..f59c90ec94 100644 --- a/awx_collection/tests/integration/targets/project_manual/tasks/create_project_dir.yml +++ b/awx_collection/tests/integration/targets/project_manual/tasks/create_project_dir.yml @@ -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 diff --git a/awx_collection/tests/integration/targets/project_update/tasks/main.yml b/awx_collection/tests/integration/targets/project_update/tasks/main.yml index 6859b2405a..4b08e685fe 100644 --- a/awx_collection/tests/integration/targets/project_update/tasks/main.yml +++ b/awx_collection/tests/integration/targets/project_update/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/role/tasks/main.yml b/awx_collection/tests/integration/targets/role/tasks/main.yml index e2805a2960..364ba67183 100644 --- a/awx_collection/tests/integration/targets/role/tasks/main.yml +++ b/awx_collection/tests/integration/targets/role/tasks/main.yml @@ -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 diff --git a/awx_collection/tests/integration/targets/schedule/tasks/main.yml b/awx_collection/tests/integration/targets/schedule/tasks/main.yml index 999df2f768..828cce1faf 100644 --- a/awx_collection/tests/integration/targets/schedule/tasks/main.yml +++ b/awx_collection/tests/integration/targets/schedule/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/schedule_rrule/tasks/main.yml b/awx_collection/tests/integration/targets/schedule_rrule/tasks/main.yml index f7a1b0e2b0..bf416b813d 100644 --- a/awx_collection/tests/integration/targets/schedule_rrule/tasks/main.yml +++ b/awx_collection/tests/integration/targets/schedule_rrule/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/settings/tasks/main.yml b/awx_collection/tests/integration/targets/settings/tasks/main.yml index 993efad588..65ae45c639 100644 --- a/awx_collection/tests/integration/targets/settings/tasks/main.yml +++ b/awx_collection/tests/integration/targets/settings/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/team/tasks/main.yml b/awx_collection/tests/integration/targets/team/tasks/main.yml index e095d9a543..f220d9194f 100644 --- a/awx_collection/tests/integration/targets/team/tasks/main.yml +++ b/awx_collection/tests/integration/targets/team/tasks/main.yml @@ -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 diff --git a/awx_collection/tests/integration/targets/token/tasks/main.yml b/awx_collection/tests/integration/targets/token/tasks/main.yml index afbcb84768..144c4d7175 100644 --- a/awx_collection/tests/integration/targets/token/tasks/main.yml +++ b/awx_collection/tests/integration/targets/token/tasks/main.yml @@ -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: diff --git a/awx_collection/tests/integration/targets/user/tasks/main.yml b/awx_collection/tests/integration/targets/user/tasks/main.yml index 7c17c24ac8..bd5a2c4660 100644 --- a/awx_collection/tests/integration/targets/user/tasks/main.yml +++ b/awx_collection/tests/integration/targets/user/tasks/main.yml @@ -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 diff --git a/awx_collection/tests/integration/targets/workflow_job_template/tasks/main.yml b/awx_collection/tests/integration/targets/workflow_job_template/tasks/main.yml index b0c7311c79..fd61783266 100644 --- a/awx_collection/tests/integration/targets/workflow_job_template/tasks/main.yml +++ b/awx_collection/tests/integration/targets/workflow_job_template/tasks/main.yml @@ -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 diff --git a/awx_collection/tests/integration/targets/workflow_launch/tasks/main.yml b/awx_collection/tests/integration/targets/workflow_launch/tasks/main.yml index 7efdaa9332..a328b83801 100644 --- a/awx_collection/tests/integration/targets/workflow_launch/tasks/main.yml +++ b/awx_collection/tests/integration/targets/workflow_launch/tasks/main.yml @@ -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 diff --git a/awx_collection/tools/roles/template_galaxy/templates/galaxy.yml.j2 b/awx_collection/tools/roles/template_galaxy/templates/galaxy.yml.j2 index d6e6a2724e..b9bb8e0ccc 100644 --- a/awx_collection/tools/roles/template_galaxy/templates/galaxy.yml.j2 +++ b/awx_collection/tools/roles/template_galaxy/templates/galaxy.yml.j2 @@ -13,7 +13,7 @@ authors: - AWX Project Contributors 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 diff --git a/awx_collection/tools/vars/examples.yml b/awx_collection/tools/vars/examples.yml index a927f970b7..95fe4a3f53 100644 --- a/awx_collection/tools/vars/examples.yml +++ b/awx_collection/tools/vars/examples.yml @@ -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"