mirror of https://github.com/ansible/ansible.git
Set HostVars._variable_manager's attrs (#65508)
When HostVars are part of the data that goes through (de)serialization when being passed from a worker process to the main process, its variable manager reference loses some of its attributes due to the implementation of __getstate__ and __setstate__ (perf utilization). Since HostVars already has those attributes, use __setstate__ to assign them. Fixes #65365pull/65508/merge
parent
0c4f167b82
commit
ec371eb227
@ -0,0 +1,2 @@
|
|||||||
|
bugfixes:
|
||||||
|
- Fix traceback when printing ``HostVars`` on native Jinja2 (https://github.com/ansible/ansible/issues/65365)
|
@ -0,0 +1 @@
|
|||||||
|
host1
|
@ -0,0 +1,10 @@
|
|||||||
|
- hosts: host1
|
||||||
|
gather_facts: no
|
||||||
|
tasks:
|
||||||
|
- name: Print vars
|
||||||
|
debug:
|
||||||
|
var: vars
|
||||||
|
|
||||||
|
- name: Print hostvars
|
||||||
|
debug:
|
||||||
|
var: hostvars
|
Loading…
Reference in New Issue