Optimise linear strategy access to physical host variables
Change from using variable manager to the var we already have for the physical host. This saves nearly 50% time for re-running playbooks/lxc-container-create.yml Change-Id: Ic50763f9c74746ef94925a4dd52d16e1f313711b
This commit is contained in:
parent
014a39ad1c
commit
871d91cf26
|
@ -164,7 +164,7 @@ class StrategyModule(LINEAR.StrategyModule):
|
|||
host=host,
|
||||
caplevel=0
|
||||
)
|
||||
physical_host_vars = self._variable_manager.get_vars(host=ph)
|
||||
physical_host_vars = ph.get_vars()
|
||||
for item in ['ansible_host', 'container_address', 'address']:
|
||||
addr = physical_host_vars.get(item)
|
||||
if addr:
|
||||
|
|
|
@ -7,7 +7,7 @@ container2 container_name=container2
|
|||
|
||||
# This is used to test I75f9d0f55ecd875caa1bf608a77c92f950b679a1
|
||||
[hosts]
|
||||
localhost_alt
|
||||
localhost_alt ansible_host=127.0.0.1
|
||||
[all_containers]
|
||||
container3 container_name=container3
|
||||
|
||||
|
|
Loading…
Reference in New Issue