Fix extra_vars bug in ansible.controller.ad_hoc_command (#14585)

* convert to valid type for serializer

* check that extra_vars are in request

* remove doubled line

* add integration test for change

* move change to the ad_hoc_command module

Signed-off-by: jessicamack <jmack@redhat.com>

* fix imports

Signed-off-by: jessicamack <jmack@redhat.com>

---------

Signed-off-by: jessicamack <jmack@redhat.com>
This commit is contained in:
jessicamack
2023-10-25 10:38:45 -04:00
committed by GitHub
parent 71a6d48612
commit 44255f378d
2 changed files with 21 additions and 1 deletions

View File

@@ -72,6 +72,21 @@
- "result is changed"
- "result.status == 'successful'"
- name: Launch an Ad Hoc Command with extra_vars
ad_hoc_command:
inventory: "Demo Inventory"
credential: "{{ ssh_cred_name }}"
module_name: "ping"
extra_vars:
var1: "test var"
wait: true
register: result
- assert:
that:
- "result is changed"
- "result.status == 'successful'"
- name: Launch an Ad Hoc Command with Execution Environment specified
ad_hoc_command:
inventory: "Demo Inventory"