-
Notifications
You must be signed in to change notification settings - Fork 356
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
Object of type HostVarsVars is not JSON serializable #1137
Comments
|
@shanemcd @AlanCoding any thoughts on that? |
I ran that playbook, and I can't get it to give any error. Could you provide more details to reproduce the issue? With the thing that it's looping over, it's likely sensitive to the contents of your inventory, or maybe the adjacent host_vars/ folder (vars plugin). I don't doubt that you might have hit this with some given inventory content, but I would be guessing to try to figure out how. |
It looks like the JSON encoder class is missing support for
I didn't specifically test this playbook, but I'd guess it has something to do with the |
Well, we can't import from ansible in that context, and |
Yep, I wasn't recommending that. Just that you could import |
Fixes: ansible#1137 Signed-off-by: Abhijeet Kasurde <[email protected]>
Fixes: ansible#1137 Signed-off-by: Abhijeet Kasurde <[email protected]>
resolved_by_pr #1181 |
I tried again, and still can't reproduce this. Could someone hold my hand for getting the above error? added file - name: Test using hostvars as mapping
connection: local
hosts: localhost
gather_facts: false
tasks:
- debug:
msg:
- "{{ item.inventory_hostname}}"
loop: "{{ ansible_play_hosts
| default([])
| map('extract', hostvars)
| list
}}" run
|
I'm getting error
when running the below playbook in AWX (ansible-runner)
ansible-runner --version
2.1.4.dev2
python --version
Python 3.8.13
The text was updated successfully, but these errors were encountered: