Fix AnsibleAction.run() when argument is not a dict
Fix ad hoc commands executed by AnsibleAction.run() when command is not
passed as a dict() but as a normal string, the same way like ordinary
ansible command works.
Check if argument is a dict() and only if it is, use json.dumps() on it.
And not break commands passed as string.
Change-Id: I8b18658bfbae57f264db007e5e81556b0512ef55
Closes-bug: 1805342
(cherry picked from commit 01fb1895a29a6f114045bef231feb6160b65ba80)
Reviewed: https:/ /review. openstack. org/628111 /git.openstack. org/cgit/ openstack/ tripleo- common/ commit/ ?id=0af9f9942e3 43c7cf5efce52a6 859cb2d605bec0
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 0af9f9942e343c7 cf5efce52a6859c b2d605bec0
Author: Radoslaw Smigielski <email address hidden>
Date: Tue Nov 27 08:21:34 2018 +0100
Fix AnsibleAction.run() when argument is not a dict
Fix ad hoc commands executed by AnsibleAction.run() when command is not
passed as a dict() but as a normal string, the same way like ordinary
ansible command works.
Check if argument is a dict() and only if it is, use json.dumps() on it.
And not break commands passed as string.
Change-Id: I8b18658bfbae57 f264db007e5e815 56b0512ef55 14045bef231feb6 160b65ba80)
Closes-bug: 1805342
(cherry picked from commit 01fb1895a29a6f1