Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflow_job_template: not accepting empty value for execution_environment #15847

Open
5 of 11 tasks
kk-at-redhat opened this issue Feb 19, 2025 · 0 comments
Open
5 of 11 tasks

Comments

@kk-at-redhat
Copy link

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to security@ansible.com instead.)

Bug Summary

which would be required to remove the setting

AWX version

4.6.7

Select the relevant components

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

Installation method

docker development environment

Modifications

no

Ansible version

2.15.13

Operating system

RHEL9

Web browser

No response

Steps to reproduce

ansible -m ansible.controller.workflow_job_template -a '{"name": "Workflow B", "workflow_nodes": [{"identifier": "1ca40111-f92b-435e-bff2-b33edd455941", "unified_job_template": {"name": "Template C", "type": "job_template"}, "execution_environment": {"name": "B"}}]}' localhost

localhost | CHANGED => {
"changed": true,
"id": 18,
"node_creation_data": [
.....

ansible -m ansible.controller.workflow_job_template -a '{"name": "Workflow B", "workflow_nodes": [{"identifier": "1ca40111-f92b-435e-bff2-b33edd455941", "unified_job_template": {"name": "Template C", "type": "job_template"}, "execution_environment": ""}]}' localhost

Expected results

localhost | CHANGED => {
"changed": true,
"id": 18,
"node_creation_data": [
.....

Actual results

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: string indices must be integers
localhost | FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/home/kk/.ansible/tmp/ansible-tmp-1739571446.1771965-1394-84107872128117/AnsiballZ_workflow_job_template.py", line 107, in \n _ansiballz_main()\n File "/home/kk/.ansible/tmp/ansible-tmp-1739571446.1771965-1394-84107872128117/AnsiballZ_workflow_job_template.py", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/kk/.ansible/tmp/ansible-tmp-1739571446.1771965-1394-84107872128117/AnsiballZ_workflow_job_template.py", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.ansible.controller.plugins.modules.workflow_job_template', init_globals=dict(_module_fqn='ansible_collections.ansible.controller.plugins.modules.workflow_job_template', _modlib_path=modlib_path),\n File "/usr/lib64/python3.9/runpy.py", line 225, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_ansible.controller.workflow_job_template_payload_vo7mnbkq/ansible_ansible.controller.workflow_job_template_payload.zip/ansible_collections/ansible/controller/plugins/modules/workflow_job_template.py", line 1016, in \n File "/tmp/ansible_ansible.controller.workflow_job_template_payload_vo7mnbkq/ansible_ansible.controller.workflow_job_template_payload.zip/ansible_collections/ansible/controller/plugins/modules/workflow_job_template.py", line 1007, in main\n File "/tmp/ansible_ansible.controller.workflow_job_template_payload_vo7mnbkq/ansible_ansible.controller.workflow_job_template_payload.zip/ansible_collections/ansible/controller/plugins/modules/workflow_job_template.py", line 658, in create_workflow_nodes\nTypeError: string indices must be integers\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant