We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
 Bug Report: awx.awx.export all does not work.
### Please confirm the following

- [X] I agree to follow this project's [code of conduct](https://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 might not receive a timely response.

### Bug Summary

using the all option does not work as noted in the [example](https://github.com/ansible/awx/blob/devel/awx_collection/plugins/modules/export.py#L111)

It should export everything from that endpoint

I tested this with both the recent pip release of awxkit, and one compiled from dev.

I also tested with the cli directly and it worked using the command
```
awx export --conf.host https://controller --conf.username admin --conf.password 123 --conf.insecure --users --users > users.json
```

### AWX version

22.0.0

### Select the relevant components

- [ ] UI
- [ ] API
- [ ] Docs
- [X] Collection
- [ ] CLI
- [ ] Other

### Installation method

kubernetes

### Modifications

no

### Ansible version

2.14.4

### Operating system

Fedora

### Web browser

_No response_

### Steps to reproduce

Run the following playbook
```
---
- name: Export Workflow
  hosts: localhost
  connection: local
  gather_facts: false
  collections:
    - ansible.controller
  environment:
     CONTROLLER_HOST: controller.nas
     CONTROLLER_USERNAME: admin
     CONTROLLER_PASSWORD: secret123
     CONTROLLER_VERIFY_SSL: False

  tasks:
    - name: Export all users
      awx.awx.export:
        users: 'all'
      register: export_results

    - name: Export users to file
      copy:
        content: "{{ export_results | to_nice_yaml( width=50, explicit_start=True, explicit_end=True) }}"
        dest: usersa.yaml
...
```
### Expected results
```
---
assets:
  users:
    - username: AWX-Collection-tests-controller_role-user
      first_name: Joe
      last_name: User
      email: joe@example.org
      is_superuser: false
      is_system_auditor: false
      password: controller_password
      related:
        roles:
          - name: Execute
            type: role
            content_object:
              organization:
                name: Default
                type: organization
              name: test-role-workflow
              type: workflow_job_template
      natural_key:
        username: AWX-Collection-tests-controller_role-user
        type: user
    - username: AWX-Collection-tests-controller_role-user-ClPzjxrRTIwcOCvO
      first_name: Joe
      last_name: User
      email: joe@example.org
      is_superuser: false
      is_system_auditor: false
      password: controller_password
      related:
        roles: []
      natural_key:
        username: AWX-Collection-tests-controller_role-user-ClPzjxrRTIwcOCvO
        type: user
changed: false
failed: false
...
```

### Actual results
```
---
assets:
    users: []
changed: false
failed: false
...
```
### Additional information

I asked @TheRealHaoLiu  to test as well to make sure it was not a local problem. 

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `awx_collection/plugins/modules/export.py`
Content:
```
1 #!/usr/bin/python
2 # coding: utf-8 -*-
3 
4 # (c) 2017, John Westcott IV <john.westcott.iv@redhat.com>
5 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
6 
7 from __future__ import absolute_import, division, print_function
8 
9 __metaclass__ = type
10 
11 
12 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'}
13 
14 
15 DOCUMENTATION = '''
16 ---
17 module: export
18 author: "John Westcott IV (@john-westcott-iv)"
19 version_added: "3.7.0"
20 short_description: export resources from Automation Platform Controller.
21 description:
22     - Export assets from Automation Platform Controller.
23 options:
24     all:
25       description:
26         - Export all assets
27       type: bool
28       default: 'False'
29     organizations:
30       description:
31         - organization names to export
32       type: list
33       elements: str
34     users:
35       description:
36         - user names to export
37       type: list
38       elements: str
39     teams:
40       description:
41         - team names to export
42       type: list
43       elements: str
44     credential_types:
45       description:
46         - credential type names to export
47       type: list
48       elements: str
49     credentials:
50       description:
51         - credential names to export
52       type: list
53       elements: str
54     execution_environments:
55       description:
56         - execution environment names to export
57       type: list
58       elements: str
59     notification_templates:
60       description:
61         - notification template names to export
62       type: list
63       elements: str
64     inventory_sources:
65       description:
66         - inventory soruces to export
67       type: list
68       elements: str
69     inventory:
70       description:
71         - inventory names to export
72       type: list
73       elements: str
74     projects:
75       description:
76         - project names to export
77       type: list
78       elements: str
79     job_templates:
80       description:
81         - job template names to export
82       type: list
83       elements: str
84     workflow_job_templates:
85       description:
86         - workflow names to export
87       type: list
88       elements: str
89     applications:
90       description:
91         - OAuth2 application names to export
92       type: list
93       elements: str
94     schedules:
95       description:
96         - schedule names to export
97       type: list
98       elements: str
99 requirements:
100   - "awxkit >= 9.3.0"
101 notes:
102   - Specifying a name of "all" for any asset type will export all items of that asset type.
103 extends_documentation_fragment: awx.awx.auth
104 '''
105 
106 EXAMPLES = '''
107 - name: Export all assets
108   export:
109     all: True
110 
111 - name: Export all inventories
112   export:
113     inventory: 'all'
114 
115 - name: Export a job template named "My Template" and all Credentials
116   export:
117     job_templates: "My Template"
118     credential: 'all'
119 
120 - name: Export a list of inventories
121   export:
122     inventory: ['My Inventory 1', 'My Inventory 2']
123 '''
124 
125 import logging
126 from ansible.module_utils.six.moves import StringIO
127 from ..module_utils.awxkit import ControllerAWXKitModule
128 
129 try:
130     from awxkit.api.pages.api import EXPORTABLE_RESOURCES
131 
132     HAS_EXPORTABLE_RESOURCES = True
133 except ImportError:
134     HAS_EXPORTABLE_RESOURCES = False
135 
136 
137 def main():
138     argument_spec = dict(
139         all=dict(type='bool', default=False),
140     )
141 
142     # We are not going to raise an error here because the __init__ method of ControllerAWXKitModule will do that for us
143     if HAS_EXPORTABLE_RESOURCES:
144         for resource in EXPORTABLE_RESOURCES:
145             argument_spec[resource] = dict(type='list', elements='str')
146 
147     module = ControllerAWXKitModule(argument_spec=argument_spec)
148 
149     if not HAS_EXPORTABLE_RESOURCES:
150         module.fail_json(msg="Your version of awxkit does not have import/export")
151 
152     # The export process will never change the AWX system
153     module.json_output['changed'] = False
154 
155     # The exporter code currently works like the following:
156     #   Empty string == all assets of that type
157     #   Non-Empty string = just one asset of that type (by name or ID)
158     #   Asset type not present or None = skip asset type (unless everything is None, then export all)
159     # Here we are going to setup a dict of values to export
160     export_args = {}
161     for resource in EXPORTABLE_RESOURCES:
162         if module.params.get('all') or module.params.get(resource) == 'all':
163             # If we are exporting everything or we got the keyword "all" we pass in an empty string for this asset type
164             export_args[resource] = ''
165         else:
166             # Otherwise we take either the string or None (if the parameter was not passed) to get one or no items
167             export_args[resource] = module.params.get(resource)
168 
169     # Currently the export process does not return anything on error
170     # It simply just logs to Python's logger
171     # Set up a log gobbler to get error messages from export_assets
172     log_capture_string = StringIO()
173     ch = logging.StreamHandler(log_capture_string)
174     for logger_name in ['awxkit.api.pages.api', 'awxkit.api.pages.page']:
175         logger = logging.getLogger(logger_name)
176         logger.setLevel(logging.ERROR)
177         ch.setLevel(logging.ERROR)
178 
179     logger.addHandler(ch)
180     log_contents = ''
181 
182     # Run the export process
183     try:
184         module.json_output['assets'] = module.get_api_v2_object().export_assets(**export_args)
185         module.exit_json(**module.json_output)
186     except Exception as e:
187         module.fail_json(msg="Failed to export assets {0}".format(e))
188     finally:
189         # Finally, consume the logs in case there were any errors and die if there were
190         log_contents = log_capture_string.getvalue()
191         log_capture_string.close()
192         if log_contents != '':
193             module.fail_json(msg=log_contents)
194 
195 
196 if __name__ == '__main__':
197     main()
198
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/awx_collection/plugins/modules/export.py b/awx_collection/plugins/modules/export.py
--- a/awx_collection/plugins/modules/export.py
+++ b/awx_collection/plugins/modules/export.py
@@ -159,7 +159,7 @@
     # Here we are going to setup a dict of values to export
     export_args = {}
     for resource in EXPORTABLE_RESOURCES:
-        if module.params.get('all') or module.params.get(resource) == 'all':
+        if module.params.get('all') or module.params.get(resource) == ['all']:
             # If we are exporting everything or we got the keyword "all" we pass in an empty string for this asset type
             export_args[resource] = ''
         else:

{"golden_diff": "diff --git a/awx_collection/plugins/modules/export.py b/awx_collection/plugins/modules/export.py\n--- a/awx_collection/plugins/modules/export.py\n+++ b/awx_collection/plugins/modules/export.py\n@@ -159,7 +159,7 @@\n     # Here we are going to setup a dict of values to export\n     export_args = {}\n     for resource in EXPORTABLE_RESOURCES:\n-        if module.params.get('all') or module.params.get(resource) == 'all':\n+        if module.params.get('all') or module.params.get(resource) == ['all']:\n             # If we are exporting everything or we got the keyword \"all\" we pass in an empty string for this asset type\n             export_args[resource] = ''\n         else:\n", "issue": " Bug Report: awx.awx.export all does not work.\n### Please confirm the following\r\n\r\n- [X] I agree to follow this project's [code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).\r\n- [X] I have checked the [current issues](https://github.com/ansible/awx/issues) for duplicates.\r\n- [X] I understand that AWX is open source software provided for free and that I might not receive a timely response.\r\n\r\n### Bug Summary\r\n\r\nusing the all option does not work as noted in the [example](https://github.com/ansible/awx/blob/devel/awx_collection/plugins/modules/export.py#L111)\r\n\r\nIt should export everything from that endpoint\r\n\r\nI tested this with both the recent pip release of awxkit, and one compiled from dev.\r\n\r\nI also tested with the cli directly and it worked using the command\r\n```\r\nawx export --conf.host https://controller --conf.username admin --conf.password 123 --conf.insecure --users --users > users.json\r\n```\r\n\r\n### AWX version\r\n\r\n22.0.0\r\n\r\n### Select the relevant components\r\n\r\n- [ ] UI\r\n- [ ] API\r\n- [ ] Docs\r\n- [X] Collection\r\n- [ ] CLI\r\n- [ ] Other\r\n\r\n### Installation method\r\n\r\nkubernetes\r\n\r\n### Modifications\r\n\r\nno\r\n\r\n### Ansible version\r\n\r\n2.14.4\r\n\r\n### Operating system\r\n\r\nFedora\r\n\r\n### Web browser\r\n\r\n_No response_\r\n\r\n### Steps to reproduce\r\n\r\nRun the following playbook\r\n```\r\n---\r\n- name: Export Workflow\r\n  hosts: localhost\r\n  connection: local\r\n  gather_facts: false\r\n  collections:\r\n    - ansible.controller\r\n  environment:\r\n     CONTROLLER_HOST: controller.nas\r\n     CONTROLLER_USERNAME: admin\r\n     CONTROLLER_PASSWORD: secret123\r\n     CONTROLLER_VERIFY_SSL: False\r\n\r\n  tasks:\r\n    - name: Export all users\r\n      awx.awx.export:\r\n        users: 'all'\r\n      register: export_results\r\n\r\n    - name: Export users to file\r\n      copy:\r\n        content: \"{{ export_results | to_nice_yaml( width=50, explicit_start=True, explicit_end=True) }}\"\r\n        dest: usersa.yaml\r\n...\r\n```\r\n### Expected results\r\n```\r\n---\r\nassets:\r\n  users:\r\n    - username: AWX-Collection-tests-controller_role-user\r\n      first_name: Joe\r\n      last_name: User\r\n      email: joe@example.org\r\n      is_superuser: false\r\n      is_system_auditor: false\r\n      password: controller_password\r\n      related:\r\n        roles:\r\n          - name: Execute\r\n            type: role\r\n            content_object:\r\n              organization:\r\n                name: Default\r\n                type: organization\r\n              name: test-role-workflow\r\n              type: workflow_job_template\r\n      natural_key:\r\n        username: AWX-Collection-tests-controller_role-user\r\n        type: user\r\n    - username: AWX-Collection-tests-controller_role-user-ClPzjxrRTIwcOCvO\r\n      first_name: Joe\r\n      last_name: User\r\n      email: joe@example.org\r\n      is_superuser: false\r\n      is_system_auditor: false\r\n      password: controller_password\r\n      related:\r\n        roles: []\r\n      natural_key:\r\n        username: AWX-Collection-tests-controller_role-user-ClPzjxrRTIwcOCvO\r\n        type: user\r\nchanged: false\r\nfailed: false\r\n...\r\n```\r\n\r\n### Actual results\r\n```\r\n---\r\nassets:\r\n    users: []\r\nchanged: false\r\nfailed: false\r\n...\r\n```\r\n### Additional information\r\n\r\nI asked @TheRealHaoLiu  to test as well to make sure it was not a local problem. \n", "before_files": [{"content": "#!/usr/bin/python\n# coding: utf-8 -*-\n\n# (c) 2017, John Westcott IV <john.westcott.iv@redhat.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n\n__metaclass__ = type\n\n\nANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'}\n\n\nDOCUMENTATION = '''\n---\nmodule: export\nauthor: \"John Westcott IV (@john-westcott-iv)\"\nversion_added: \"3.7.0\"\nshort_description: export resources from Automation Platform Controller.\ndescription:\n    - Export assets from Automation Platform Controller.\noptions:\n    all:\n      description:\n        - Export all assets\n      type: bool\n      default: 'False'\n    organizations:\n      description:\n        - organization names to export\n      type: list\n      elements: str\n    users:\n      description:\n        - user names to export\n      type: list\n      elements: str\n    teams:\n      description:\n        - team names to export\n      type: list\n      elements: str\n    credential_types:\n      description:\n        - credential type names to export\n      type: list\n      elements: str\n    credentials:\n      description:\n        - credential names to export\n      type: list\n      elements: str\n    execution_environments:\n      description:\n        - execution environment names to export\n      type: list\n      elements: str\n    notification_templates:\n      description:\n        - notification template names to export\n      type: list\n      elements: str\n    inventory_sources:\n      description:\n        - inventory soruces to export\n      type: list\n      elements: str\n    inventory:\n      description:\n        - inventory names to export\n      type: list\n      elements: str\n    projects:\n      description:\n        - project names to export\n      type: list\n      elements: str\n    job_templates:\n      description:\n        - job template names to export\n      type: list\n      elements: str\n    workflow_job_templates:\n      description:\n        - workflow names to export\n      type: list\n      elements: str\n    applications:\n      description:\n        - OAuth2 application names to export\n      type: list\n      elements: str\n    schedules:\n      description:\n        - schedule names to export\n      type: list\n      elements: str\nrequirements:\n  - \"awxkit >= 9.3.0\"\nnotes:\n  - Specifying a name of \"all\" for any asset type will export all items of that asset type.\nextends_documentation_fragment: awx.awx.auth\n'''\n\nEXAMPLES = '''\n- name: Export all assets\n  export:\n    all: True\n\n- name: Export all inventories\n  export:\n    inventory: 'all'\n\n- name: Export a job template named \"My Template\" and all Credentials\n  export:\n    job_templates: \"My Template\"\n    credential: 'all'\n\n- name: Export a list of inventories\n  export:\n    inventory: ['My Inventory 1', 'My Inventory 2']\n'''\n\nimport logging\nfrom ansible.module_utils.six.moves import StringIO\nfrom ..module_utils.awxkit import ControllerAWXKitModule\n\ntry:\n    from awxkit.api.pages.api import EXPORTABLE_RESOURCES\n\n    HAS_EXPORTABLE_RESOURCES = True\nexcept ImportError:\n    HAS_EXPORTABLE_RESOURCES = False\n\n\ndef main():\n    argument_spec = dict(\n        all=dict(type='bool', default=False),\n    )\n\n    # We are not going to raise an error here because the __init__ method of ControllerAWXKitModule will do that for us\n    if HAS_EXPORTABLE_RESOURCES:\n        for resource in EXPORTABLE_RESOURCES:\n            argument_spec[resource] = dict(type='list', elements='str')\n\n    module = ControllerAWXKitModule(argument_spec=argument_spec)\n\n    if not HAS_EXPORTABLE_RESOURCES:\n        module.fail_json(msg=\"Your version of awxkit does not have import/export\")\n\n    # The export process will never change the AWX system\n    module.json_output['changed'] = False\n\n    # The exporter code currently works like the following:\n    #   Empty string == all assets of that type\n    #   Non-Empty string = just one asset of that type (by name or ID)\n    #   Asset type not present or None = skip asset type (unless everything is None, then export all)\n    # Here we are going to setup a dict of values to export\n    export_args = {}\n    for resource in EXPORTABLE_RESOURCES:\n        if module.params.get('all') or module.params.get(resource) == 'all':\n            # If we are exporting everything or we got the keyword \"all\" we pass in an empty string for this asset type\n            export_args[resource] = ''\n        else:\n            # Otherwise we take either the string or None (if the parameter was not passed) to get one or no items\n            export_args[resource] = module.params.get(resource)\n\n    # Currently the export process does not return anything on error\n    # It simply just logs to Python's logger\n    # Set up a log gobbler to get error messages from export_assets\n    log_capture_string = StringIO()\n    ch = logging.StreamHandler(log_capture_string)\n    for logger_name in ['awxkit.api.pages.api', 'awxkit.api.pages.page']:\n        logger = logging.getLogger(logger_name)\n        logger.setLevel(logging.ERROR)\n        ch.setLevel(logging.ERROR)\n\n    logger.addHandler(ch)\n    log_contents = ''\n\n    # Run the export process\n    try:\n        module.json_output['assets'] = module.get_api_v2_object().export_assets(**export_args)\n        module.exit_json(**module.json_output)\n    except Exception as e:\n        module.fail_json(msg=\"Failed to export assets {0}\".format(e))\n    finally:\n        # Finally, consume the logs in case there were any errors and die if there were\n        log_contents = log_capture_string.getvalue()\n        log_capture_string.close()\n        if log_contents != '':\n            module.fail_json(msg=log_contents)\n\n\nif __name__ == '__main__':\n    main()\n", "path": "awx_collection/plugins/modules/export.py"}], "after_files": [{"content": "#!/usr/bin/python\n# coding: utf-8 -*-\n\n# (c) 2017, John Westcott IV <john.westcott.iv@redhat.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n\n__metaclass__ = type\n\n\nANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'}\n\n\nDOCUMENTATION = '''\n---\nmodule: export\nauthor: \"John Westcott IV (@john-westcott-iv)\"\nversion_added: \"3.7.0\"\nshort_description: export resources from Automation Platform Controller.\ndescription:\n    - Export assets from Automation Platform Controller.\noptions:\n    all:\n      description:\n        - Export all assets\n      type: bool\n      default: 'False'\n    organizations:\n      description:\n        - organization names to export\n      type: list\n      elements: str\n    users:\n      description:\n        - user names to export\n      type: list\n      elements: str\n    teams:\n      description:\n        - team names to export\n      type: list\n      elements: str\n    credential_types:\n      description:\n        - credential type names to export\n      type: list\n      elements: str\n    credentials:\n      description:\n        - credential names to export\n      type: list\n      elements: str\n    execution_environments:\n      description:\n        - execution environment names to export\n      type: list\n      elements: str\n    notification_templates:\n      description:\n        - notification template names to export\n      type: list\n      elements: str\n    inventory_sources:\n      description:\n        - inventory soruces to export\n      type: list\n      elements: str\n    inventory:\n      description:\n        - inventory names to export\n      type: list\n      elements: str\n    projects:\n      description:\n        - project names to export\n      type: list\n      elements: str\n    job_templates:\n      description:\n        - job template names to export\n      type: list\n      elements: str\n    workflow_job_templates:\n      description:\n        - workflow names to export\n      type: list\n      elements: str\n    applications:\n      description:\n        - OAuth2 application names to export\n      type: list\n      elements: str\n    schedules:\n      description:\n        - schedule names to export\n      type: list\n      elements: str\nrequirements:\n  - \"awxkit >= 9.3.0\"\nnotes:\n  - Specifying a name of \"all\" for any asset type will export all items of that asset type.\nextends_documentation_fragment: awx.awx.auth\n'''\n\nEXAMPLES = '''\n- name: Export all assets\n  export:\n    all: True\n\n- name: Export all inventories\n  export:\n    inventory: 'all'\n\n- name: Export a job template named \"My Template\" and all Credentials\n  export:\n    job_templates: \"My Template\"\n    credential: 'all'\n\n- name: Export a list of inventories\n  export:\n    inventory: ['My Inventory 1', 'My Inventory 2']\n'''\n\nimport logging\nfrom ansible.module_utils.six.moves import StringIO\nfrom ..module_utils.awxkit import ControllerAWXKitModule\n\ntry:\n    from awxkit.api.pages.api import EXPORTABLE_RESOURCES\n\n    HAS_EXPORTABLE_RESOURCES = True\nexcept ImportError:\n    HAS_EXPORTABLE_RESOURCES = False\n\n\ndef main():\n    argument_spec = dict(\n        all=dict(type='bool', default=False),\n    )\n\n    # We are not going to raise an error here because the __init__ method of ControllerAWXKitModule will do that for us\n    if HAS_EXPORTABLE_RESOURCES:\n        for resource in EXPORTABLE_RESOURCES:\n            argument_spec[resource] = dict(type='list', elements='str')\n\n    module = ControllerAWXKitModule(argument_spec=argument_spec)\n\n    if not HAS_EXPORTABLE_RESOURCES:\n        module.fail_json(msg=\"Your version of awxkit does not have import/export\")\n\n    # The export process will never change the AWX system\n    module.json_output['changed'] = False\n\n    # The exporter code currently works like the following:\n    #   Empty string == all assets of that type\n    #   Non-Empty string = just one asset of that type (by name or ID)\n    #   Asset type not present or None = skip asset type (unless everything is None, then export all)\n    # Here we are going to setup a dict of values to export\n    export_args = {}\n    for resource in EXPORTABLE_RESOURCES:\n        if module.params.get('all') or module.params.get(resource) == ['all']:\n            # If we are exporting everything or we got the keyword \"all\" we pass in an empty string for this asset type\n            export_args[resource] = ''\n        else:\n            # Otherwise we take either the string or None (if the parameter was not passed) to get one or no items\n            export_args[resource] = module.params.get(resource)\n\n    # Currently the export process does not return anything on error\n    # It simply just logs to Python's logger\n    # Set up a log gobbler to get error messages from export_assets\n    log_capture_string = StringIO()\n    ch = logging.StreamHandler(log_capture_string)\n    for logger_name in ['awxkit.api.pages.api', 'awxkit.api.pages.page']:\n        logger = logging.getLogger(logger_name)\n        logger.setLevel(logging.ERROR)\n        ch.setLevel(logging.ERROR)\n\n    logger.addHandler(ch)\n    log_contents = ''\n\n    # Run the export process\n    try:\n        module.json_output['assets'] = module.get_api_v2_object().export_assets(**export_args)\n        module.exit_json(**module.json_output)\n    except Exception as e:\n        module.fail_json(msg=\"Failed to export assets {0}\".format(e))\n    finally:\n        # Finally, consume the logs in case there were any errors and die if there were\n        log_contents = log_capture_string.getvalue()\n        log_capture_string.close()\n        if log_contents != '':\n            module.fail_json(msg=log_contents)\n\n\nif __name__ == '__main__':\n    main()\n", "path": "awx_collection/plugins/modules/export.py"}]}