You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 [email protected] instead.)
Bug Summary
When use try to set extra_vars from the module ansible.controller.ad_hoc_command , you get the following error:
FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/libexec/platform-python"}, "changed": false, "msg": "Failed to launch command, see response for details", "response": {"json": {"extra_vars": ["Not a valid string."]}, "status_code": 400}}
According to ansible.controller collection's official documentation, parameter "extra_vars" is a type of dictionary but, according to Tower API official documentation, parameter "extra_vars" is a type of string.
I have been testing with other modules, which require the extra_vars e.g (ansible.controller.job_launch), and it's working.
AWX version
4.4.2
Select the relevant components
UI
UI (tech preview)
API
Docs
Collection
CLI
Other
Installation method
N/A
Modifications
no
Ansible version
ansible [core 2.15.0]
Operating system
RHEL 8.8
Web browser
Chrome
Steps to reproduce
Create a playbook which contains the module ansible.controller.ad_hoc_command:
- hosts: all
gather_facts: false
tasks:
- name: Launch an ad hoc command
ansible.controller.ad_hoc_command:
controller_host: <Controller_host>
controller_username: <Controller_user>
controller_password: <Controller_password>
credential: "test credentials"
inventory: "test inventory"
module_name: "ping"
extra_vars:
var1: "My First Variable"
Run the playbook.
Check the output:
TASK [Launch an ad hoc command] **************************************************************************************************************************************************************************************************************
fatal: [<Controller_host>]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/libexec/platform-python"}, "changed": false, "msg": "Failed to launch command, see response for details", "response": {"json": {"extra_vars": ["Not a valid string."]}, "status_code": 400}}
A similar playbook with the module ansible.controller.job_launch works successfully:
ansible.controller.job_launch:
job_template: "github test"
extra_vars:
var1: "My First Variable"
var2: "My Second Variable"
var3: "My Third Variable"
job_type: run
Expected results
Add extra variables with the module ansible.controller.ad_hoc_command:
Actual results
Not able to use the extra_vars
Additional information
No response
The text was updated successfully, but these errors were encountered:
Please confirm the following
[email protected]
instead.)Bug Summary
When use try to set extra_vars from the module ansible.controller.ad_hoc_command , you get the following error:
FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/libexec/platform-python"}, "changed": false, "msg": "Failed to launch command, see response for details", "response": {"json": {"extra_vars": ["Not a valid string."]}, "status_code": 400}}
According to ansible.controller collection's official documentation, parameter "extra_vars" is a type of dictionary but, according to Tower API official documentation, parameter "extra_vars" is a type of string.
I have been testing with other modules, which require the extra_vars e.g (ansible.controller.job_launch), and it's working.
AWX version
4.4.2
Select the relevant components
Installation method
N/A
Modifications
no
Ansible version
ansible [core 2.15.0]
Operating system
RHEL 8.8
Web browser
Chrome
Steps to reproduce
A similar playbook with the module ansible.controller.job_launch works successfully:
Expected results
Add extra variables with the module ansible.controller.ad_hoc_command:
Actual results
Not able to use the extra_vars
Additional information
No response
The text was updated successfully, but these errors were encountered: