From f74a14e34f20ec9244a15f71cb8400c76c930a72 Mon Sep 17 00:00:00 2001 From: Bianca Henderson Date: Mon, 18 Oct 2021 11:08:17 -0400 Subject: [PATCH] Update auth_plugin doc extension to fix malformed Collections docs --- .../plugins/doc_fragments/auth_plugin.py | 105 +++++++++--------- .../plugins/inventory/controller.py | 2 +- .../plugins/lookup/controller_api.py | 3 +- 3 files changed, 57 insertions(+), 53 deletions(-) diff --git a/awx_collection/plugins/doc_fragments/auth_plugin.py b/awx_collection/plugins/doc_fragments/auth_plugin.py index 7b91632bb6..50743d0a79 100644 --- a/awx_collection/plugins/doc_fragments/auth_plugin.py +++ b/awx_collection/plugins/doc_fragments/auth_plugin.py @@ -13,56 +13,61 @@ class ModuleDocFragment(object): # Automation Platform Controller documentation fragment DOCUMENTATION = r''' options: - host: - description: The network address of your Automation Platform Controller host. - env: - - name: CONTROLLER_HOST - - name: TOWER_HOST - deprecated: - removed_from_collection: 'awx.awx.controller' - removed_in_version: '4.0.0' - alternatives: 'CONTROLLER_HOST' - username: - description: The user that you plan to use to access inventories on the controller. - env: - - name: CONTROLLER_USERNAME - - name: TOWER_USERNAME - deprecated: - removed_from_collection: 'awx.awx.controller' - removed_in_version: '4.0.0' - alternatives: 'CONTROLLER_USERNAME' - password: - description: The password for your controller user. - env: - - name: CONTROLLER_PASSWORD - - name: TOWER_PASSWORD - deprecated: - removed_from_collection: 'awx.awx.controller' - removed_in_version: '4.0.0' - alternatives: 'CONTROLLER_PASSWORD' - oauth_token: - description: - - The OAuth token to use. - env: - - name: CONTROLLER_OAUTH_TOKEN - - name: TOWER_OAUTH_TOKEN - deprecated: - removed_from_collection: 'awx.awx.controller' - removed_in_version: '4.0.0' - alternatives: 'CONTROLLER_OAUTH_TOKEN' - verify_ssl: - description: - - 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: - - name: CONTROLLER_VERIFY_SSL - - name: TOWER_VERIFY_SSL - deprecated: - removed_from_collection: 'awx.awx.controller' - removed_in_version: '4.0.0' - alternatives: 'CONTROLLER_VERIFY_SSL' - aliases: [ validate_certs ] + host: + description: The network address of your Automation Platform Controller host. + env: + - name: CONTROLLER_HOST + - name: TOWER_HOST + deprecated: + - removed_from_collection: 'awx.awx.controller' + - removed_in: '4.0.0' + - why: Collection name change + - alternative: 'CONTROLLER_HOST' + username: + description: The user that you plan to use to access inventories on the controller. + env: + - name: CONTROLLER_USERNAME + - name: TOWER_USERNAME + deprecated: + - removed_from_collection: 'awx.awx.controller' + - removed_in: '4.0.0' + - why: Collection name change + - alternative: 'CONTROLLER_USERNAME' + password: + description: The password for your controller user. + env: + - name: CONTROLLER_PASSWORD + - name: TOWER_PASSWORD + deprecated: + - removed_from_collection: 'awx.awx.controller' + - removed_in: '4.0.0' + - why: Collection name change + - alternative: 'CONTROLLER_PASSWORD' + oauth_token: + description: + - The OAuth token to use. + env: + - name: CONTROLLER_OAUTH_TOKEN + - name: TOWER_OAUTH_TOKEN + deprecated: + - removed_from_collection: 'awx.awx.controller' + - removed_in: '4.0.0' + - why: Collection name change + - alternative: 'CONTROLLER_OAUTH_TOKEN' + verify_ssl: + description: + - 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: + - name: CONTROLLER_VERIFY_SSL + - name: TOWER_VERIFY_SSL + deprecated: + - removed_from_collection: 'awx.awx.controller' + - removed_in: '4.0.0' + - why: Collection name change + - alternative: 'CONTROLLER_VERIFY_SSL' + aliases: [ validate_certs ] notes: - If no I(config_file) is provided we will attempt to use the tower-cli library diff --git a/awx_collection/plugins/inventory/controller.py b/awx_collection/plugins/inventory/controller.py index 78aa903233..9cf36550a1 100644 --- a/awx_collection/plugins/inventory/controller.py +++ b/awx_collection/plugins/inventory/controller.py @@ -19,7 +19,6 @@ description: the path in the command would be /path/to/controller_inventory.(yml|yaml). If some arguments in the config file are missing, this plugin will try to fill in missing arguments by reading from environment variables. - If reading configurations from environment variables, the path in the command must be @controller_inventory. -extends_documentation_fragment: awx.awx.auth_plugin options: inventory_id: description: @@ -35,6 +34,7 @@ options: description: Make extra requests to provide all group vars with metadata about the source host. type: bool default: False +extends_documentation_fragment: awx.awx.auth_plugin ''' EXAMPLES = ''' diff --git a/awx_collection/plugins/lookup/controller_api.py b/awx_collection/plugins/lookup/controller_api.py index d1de34271d..e7ac8829e7 100644 --- a/awx_collection/plugins/lookup/controller_api.py +++ b/awx_collection/plugins/lookup/controller_api.py @@ -15,7 +15,6 @@ description: 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.controller collection see the controller_meta module -extends_documentation_fragment: awx.awx.auth_plugin options: _terms: description: @@ -63,7 +62,7 @@ options: - If a list view returns more an max_objects an exception will be raised type: integer default: 1000 - +extends_documentation_fragment: awx.awx.auth_plugin notes: - If the query is not filtered properly this can cause a performance impact. """