diff options
author | Martin Krizek <martin.krizek@gmail.com> | 2024-10-03 16:02:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-03 16:02:02 +0200 |
commit | d6d2251929c84c3aa883bad7db0f19cc9ff0339e (patch) | |
tree | 1e101cf7529ca65f2867d95fd526ae6cba94e096 /test/integration/targets/old_style_vars_plugins/runme.sh | |
parent | file: simplify the code (#84043) (diff) | |
download | ansible-d6d2251929c84c3aa883bad7db0f19cc9ff0339e.tar.xz ansible-d6d2251929c84c3aa883bad7db0f19cc9ff0339e.zip |
Reduce number of implicit meta tasks (#84007)
This greatly reduces run time on large inventories since meta tasks are
executed in the main process sequentially and just executing them is expensive.
This change avoids running the following implicit meta tasks:
* ``flush_handlers`` on hosts where no handlers are notified
* ``noop`` for the linear strategy's lockstep, instead hosts that are
not executing the current task are just not part of the current host loop
A playbook consiting of two simple plays both running on ~6000 hosts
runs in:
devel: 37s
this PR: 1.3s
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Diffstat (limited to 'test/integration/targets/old_style_vars_plugins/runme.sh')
-rwxr-xr-x | test/integration/targets/old_style_vars_plugins/runme.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/integration/targets/old_style_vars_plugins/runme.sh b/test/integration/targets/old_style_vars_plugins/runme.sh index 6905b78d29..ca64f5755b 100755 --- a/test/integration/targets/old_style_vars_plugins/runme.sh +++ b/test/integration/targets/old_style_vars_plugins/runme.sh @@ -35,13 +35,13 @@ trap 'rm -rf -- "out.txt"' EXIT ANSIBLE_DEBUG=True ansible-playbook test_task_vars.yml > out.txt [ "$(grep -c "Loading VarsModule 'host_group_vars'" out.txt)" -eq 1 ] -[ "$(grep -c "Loading VarsModule 'require_enabled'" out.txt)" -gt 50 ] -[ "$(grep -c "Loading VarsModule 'auto_enabled'" out.txt)" -gt 50 ] +[ "$(grep -c "Loading VarsModule 'require_enabled'" out.txt)" -eq 22 ] +[ "$(grep -c "Loading VarsModule 'auto_enabled'" out.txt)" -eq 22 ] export ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars ANSIBLE_DEBUG=True ansible-playbook test_task_vars.yml > out.txt [ "$(grep -c "Loading VarsModule 'host_group_vars'" out.txt)" -eq 1 ] [ "$(grep -c "Loading VarsModule 'require_enabled'" out.txt)" -lt 3 ] -[ "$(grep -c "Loading VarsModule 'auto_enabled'" out.txt)" -gt 50 ] +[ "$(grep -c "Loading VarsModule 'auto_enabled'" out.txt)" -eq 22 ] ansible localhost -m include_role -a 'name=a' "$@" |