Hi. We're trying to use this role as part of a much larger Ansible inventory where switches are just one of many host types. As a result of this and a large collection of templated host variables, the following step which requires all hostvars to be rendered out is incredibly slow:
- name: Create simulation topology and other needed files
delegate_to: localhost
run_once: true
simulation:
inventory: "{{ ansible_play_hosts_all | sort() }}"
hostvars: "{{ hostvars }}"
groups: "{{ groups }}"
I believe the same functionality can be acheived as follows, but this only causes host vars to be rendered for hosts which are actually relevant to the role:
In create_avd_node_files.yml, remove the arguments:
- name: Create simulation topology and other needed files
delegate_to: localhost
run_once: true
simulation:
Hi. We're trying to use this role as part of a much larger Ansible inventory where switches are just one of many host types. As a result of this and a large collection of templated host variables, the following step which requires all
hostvars
to be rendered out is incredibly slow:https://github.com/arista-netdevops-community/eos_designs_to_containerlab/blob/main/tasks/create_avd_node_files.yml#L27
I believe the same functionality can be acheived as follows, but this only causes host vars to be rendered for hosts which are actually relevant to the role:
In create_avd_node_files.yml, remove the arguments:
In the simulation.py action plugin:
This certainly appears to work for us, and assuming it doesn't cause an obvious regression it would be great if it could be adjusted.