Repository: ansible/awx

Issue:
doc error with inventory plugin for latest awx.awx inventory plugin 
### Please confirm the following

- [X] I agree to follow this project's [code of conduct](http://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
- [X] I have checked the [current issues](https://github.com/ansible/awx/issues) for duplicates.
- [X] I understand that AWX is open source software provided for free and that I am not entitled to status updates or other assurances.

### Summary

The documentation for the inventory plugin, awx.awx.controller, was malformed.

rendered webpage for docs is here: https://docs.ansible.com/ansible/latest/collections/awx/awx/controller_inventory.html#ansible-collections-awx-awx-controller-inventory

### AWX version

N/A

### Installation method

openshift

### Modifications

no

### Ansible version

n/a

### Operating system

n/a

### Web browser

Chrome

### Steps to reproduce

go to https://docs.ansible.com/ansible/latest/collections/awx/awx/controller_inventory.html#ansible-collections-awx-awx-controller-inventory

there is docs errors on the webpage 

>The documentation for the inventory plugin, awx.awx.controller, was malformed.



### Expected results

no errors

### Actual results

![image](https://user-images.githubusercontent.com/6537680/127372510-15ad611c-3428-42ba-b719-c3b1468dbf27.png)


### Additional information

fast track this to infamous Chris Meyers


Discussion:
Please make sure you are running `ansible-test sanity` from `devel`, that should help catch these errors.
@gundalow in https://github.com/ansible/awx/pull/10788 @beeankha put up some more fixes after running `ansible-test sanity` with recent `devel`. These don't look related to the docs rendering stuff. Do you think those are related to the docs error? If not, can you point us in some other direction for how to test/fix this?
I continue seeing the error on https://docs.ansible.com/ansible/latest/collections/awx/awx/controller_inventory.html#ansible-collections-awx-awx-controller-inventory

@beeankha @tvo318 @IPvSean how should be proceed to update the docs page?
@Zokormazo I'll try to push some more fixes to this.
The error continues being there. Will try to fix the pipeline to update this tomorrow
Hi there, I am also still seeing the error. Any news on the fix? Thanks much!
I still have some friction running [ansible-test sanity](https://github.com/ansible/ansible/issues/66704#issuecomment-995969223) locally and we don't have this hooked up in any automated way for the `devel` Ansible branch.

If I install it, `ansible-doc -t inventory awx.awx.controller` works just fine (again, with Ansible `devel`).

Right now I don't feel like I have enough info to replicate these errors.
`deprecated` is supposed to be a dictionary, not a list of dictionaries

https://github.com/ansible/awx/blob/devel/awx_collection/plugins/doc_fragments/auth_plugin.py#L22 
Also `ansible-test sanity` won't help since validate-modules still does not check plugins (see https://github.com/ansible/ansible/pull/71734).

Resolving patch:
diff --git a/awx_collection/plugins/doc_fragments/auth_plugin.py b/awx_collection/plugins/doc_fragments/auth_plugin.py
--- a/awx_collection/plugins/doc_fragments/auth_plugin.py
+++ b/awx_collection/plugins/doc_fragments/auth_plugin.py
@@ -18,42 +18,42 @@ class ModuleDocFragment(object):
     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'
+      deprecated:
+        collection_name: 'awx.awx'
+        version: '4.0.0'
+        why: Collection name change
+        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: '4.0.0'
-    - why: Collection name change
-    - alternative: 'CONTROLLER_USERNAME'
+      deprecated:
+        collection_name: 'awx.awx'
+        version: '4.0.0'
+        why: Collection name change
+        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: '4.0.0'
-    - why: Collection name change
-    - alternative: 'CONTROLLER_PASSWORD'
+      deprecated:
+        collection_name: 'awx.awx'
+        version: '4.0.0'
+        why: Collection name change
+        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: '4.0.0'
-    - why: Collection name change
-    - alternative: 'CONTROLLER_OAUTH_TOKEN'
+      deprecated:
+        collection_name: 'awx.awx'
+        version: '4.0.0'
+        why: Collection name change
+        alternatives: 'CONTROLLER_OAUTH_TOKEN'
   verify_ssl:
     description:
     - Specify whether Ansible should verify the SSL certificate of the controller host.
@@ -62,11 +62,11 @@ class ModuleDocFragment(object):
     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'
+      deprecated:
+        collection_name: 'awx.awx'
+        version: '4.0.0'
+        why: Collection name change
+        alternatives: 'CONTROLLER_VERIFY_SSL'
     aliases: [ validate_certs ]
 
 notes:


Test patch: