Unsupported parameters for (awx.awx.export) module: credentials, job_templates

I had asked this question on the awx github but they cannot reproduce it.

Bug Summary

awx.awx.export returns:
TASK [Export workflow job template] ******************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “Unsupported parameters for (awx.awx.export) module: credentials, job_templates. Supported parameters include: controller_password (tower_password), request_timeout, controller_host (tower_host), controller_oauthtoken (tower_oauthtoken), all, validate_certs (tower_verify_ssl), controller_username (tower_username), controller_config_file (tower_config_file).”}

The job_templates option should be available according to:
https://galaxy.ansible.com/ui/repo/published/awx/awx/content/module/export/?extIdCarryOver=true&sc_cid=701f2000001OH7YAAW

AWX version

awxkit 24.6.1

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

N/A

Modifications

no

Ansible version

2.13.2

Operating system

MacOS Sonoma 14.5

Web browser

Firefox

Steps to reproduce

ansible-playbook /Users/myself/Documents/Ansible/AnsibleAutomation_platform_rebuild/export_workflow.yaml

Expected results

PLAY RECAP *******************************************************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0 

Actual results

[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Export Workflow] *******************************************************************************************************************************************************************************************

TASK [Export workflow job template] ******************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (awx.awx.export) module: credentials, job_templates. Supported parameters include: controller_password (tower_password), request_timeout, controller_host (tower_host), controller_oauthtoken (tower_oauthtoken), all, validate_certs (tower_verify_ssl), controller_username (tower_username), controller_config_file (tower_config_file)."}

PLAY RECAP *******************************************************************************************************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

Additional information

python3 -m pip install awxkit
Requirement already satisfied: awxkit in /opt/homebrew/lib/python3.10/site-packages (24.6.1)
Requirement already satisfied: PyYAML in /opt/homebrew/lib/python3.10/site-packages (from awxkit) (6.0.1)
Requirement already satisfied: setuptools in /opt/homebrew/lib/python3.10/site-packages (from awxkit) (59.6.0)
Requirement already satisfied: requests in /opt/homebrew/lib/python3.10/site-packages (from awxkit) (2.32.3)
Requirement already satisfied: charset-normalizer<4,>=2 in /opt/homebrew/lib/python3.10/site-packages (from requests->awxkit) (3.3.2)
Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/homebrew/lib/python3.10/site-packages (from requests->awxkit) (2.2.2)
Requirement already satisfied: idna<4,>=2.5 in /opt/homebrew/lib/python3.10/site-packages (from requests->awxkit) (3.7)
Requirement already satisfied: certifi>=2017.4.17 in /opt/homebrew/lib/python3.10/site-packages (from requests->awxkit) (2024.7.4)

Also the playbook:

---
- name: Export Workflow
  hosts: localhost
  connection: local
  gather_facts: false
  collections:
    - awx.awx
  environment:
     CONTROLLER_HOST: https://ansibleautomation.mycompany.com/
     CONTROLLER_USERNAME: me2500
     CONTROLLER_PASSWORD: redacted
     CONTROLLER_VERIFY_SSL: False
  tasks:
    - name: Export workflow job template
      awx.awx.export:
        job_templates: "Server Decom - 1"
        credentials: 'all'
      register: export_results
    - debug:
        var: export_results
    - name: Export workflow job template to file
      copy:
        content: "{{ export_results | to_nice_yaml( width=50, explicit_start=True, explicit_end=True) }}"
        dest: workflow.yaml

Hi, which versions of awx.awx collection are installed on your environment?
There may be different versions of awx.awx installed in different locations.

ansible-galaxy collection list | grep -E "^#|awx"

Running that I found this:

# /Users/me/.ansible/collections/ansible_collections
awx.awx                             24.6.1 
# /opt/homebrew/lib/python3.9/site-packages/ansible_collections
awx.awx                             21.2.0

Following that, my ansible galaxy install was by default using a python3.9 install that I had forgotten about. I removed it (the whole py3.9 environment), and reinstalled into my main python3 (which is python3.12), and now I’m running into this error:

fatal: [localhost]: FAILED! => {
“changed”: false,
“module_stderr”: “”,
“module_stdout”: “\n{"changed": false, "assets": {"users": null, "organizations": null, "teams": null, "credential_types": null, "credentials": null, "notification_templates": null, "projects": null, "inventory": null, "inventory_sources": null, "job_templates": null, "workflow_job_templates": null, "execution_environments": null, "applications": null, "schedules": null}, "invocation": {"module_args": {"all": true, "controller_host": "https://my.company.com/\”, "controller_username": "me", "controller_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "validate_certs": false, "request_timeout": null, "controller_oauthtoken": null, "controller_config_file": null, "users": null, "organizations": null, "teams": null, "credential_types": null, "credentials": null, "notification_templates": null, "projects": null, "inventory": null, "inventory_sources": null, "job_templates": null, "workflow_job_templates": null, "execution_environments": null, "applications": null, "schedules": null}}}\n\n{"failed": true, "msg": "This endpoint raised an error: /api/v2/users/\nThis endpoint raised an error: /api/v2/organizations/\nThis endpoint raised an error: /api/v2/teams/\nThis endpoint raised an error: /api/v2/credential_types/\nThis endpoint raised an error: /api/v2/credentials/\nThis endpoint raised an error: /api/v2/notification_templates/\nThis endpoint raised an error: /api/v2/projects/\nThis endpoint raised an error: /api/v2/inventories/\nThis endpoint raised an error: /api/v2/inventory_sources/\nThis endpoint raised an error: /api/v2/job_templates/\nThis endpoint raised an error: /api/v2/workflow_job_templates/\nThis endpoint raised an error: /api/v2/execution_environments/\nThis endpoint raised an error: /api/v2/applications/\nThis endpoint raised an error: /api/v2/schedules/\n", "exception": " File \"/var/folders/_w/1xw1qh52410qhfh4z08gc0h0000gq/T/ansible_export_payload_6bgrgzi/ansible_export_payload.zip/ansible_collections/awx/awx/plugins/modules/export.py\", line 185, in main\n File \"/var/folders/_w/1xw1qh52410qhfh4z08gc0h0000gq/T/ansible_export_payload_6bgrgzi/ansible_export_payload.zip/ansible_collections/awx/awx/plugins/module_utils/controller_api.py\", line 283, in exit_json\n super().exit_json(**kwargs)\n File \"/var/folders/_w/1xw1qh52410qhfh4z08gc0h0000gq/T/ansible_export_payload_6bgrgzi/ansible_export_payload.zip/ansible/module_utils/basic.py\", line 1534, in exit_json\n sys.exit(0)\n", "invocation": {"module_args": {"all": true, "controller_host": "https://my.company.com/\“, "controller_username": "me", "controller_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "validate_certs": false, "request_timeout": null, "controller_oauthtoken": null, "controller_config_file": null, "users": null, "organizations": null, "teams": null, "credential_types": null, "credentials": null, "notification_templates": null, "projects": null, "inventory": null, "inventory_sources": null, "job_templates": null, "workflow_job_templates": null, "execution_environments": null, "applications": null, "schedules": null}}}\n”,
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,
“rc”: 1
}

PLAY RECAP **********************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0