ansible/test/units/plugins
James Cammarata 51b33b79c0
T woerner max concurrent (#60702)
* play, block, task: New attribute forks

With this it is possible to limit the number of concurrent task runs.
forks can now be used in play, block and task. If forks is set in different
levels in the chain, then the smallest value will be used for the task.

The attribute has been added to the Base class as a list to easily provide
all the values that have been set in the different levels of the chain.

A warning has been added because of the conflict with run_once. forks will
be ignored in this case.

The forks limitation in StrategyBase._queue_task is not used for the free
strategy.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>

* Handle forks in free strategy

The forks attribute for the free strategy is handled in run in the free
StrategyModule. This is dony by counting the amount of tasks where the uuid
is the same as the current task, that should be queued next. If this amount
is bigger or equal to the forks attribute from the chain (task, block,
play), then it will be skipped to the next host. Like it is also done with
blocked_hosts.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>

* Test cases for forks with linear and free strategy

With ansible_python_interpreter defined in inventory file using
ansible_playbook_python.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>

* Changing forks keyword to throttle and adding some more docs
2019-08-28 18:47:39 -05:00
..
action win_updates: Add flag to only download updates without installing them (#58631) 2019-08-28 09:46:59 +10:00
cache Improve testing of FactCache (#55739) 2019-06-10 16:26:24 -04:00
callback Unit tests: remove unused imports (#59812) 2019-08-02 17:18:14 +02:00
cliconf Unit tests: remove unused imports (#59812) 2019-08-02 17:18:14 +02:00
connection Move instantiation of terminal plugin earlier (#61261) 2019-08-27 14:33:05 -04:00
filter unit tests: remove unused imports (#60462) 2019-08-13 19:21:43 +02:00
httpapi unit tests: remove unused imports (#60462) 2019-08-13 19:21:43 +02:00
inventory add IAM role assumption to aws_ec2 inventory (#41637) 2019-06-18 15:34:41 -07:00
loader_fixtures Don't cache duplicate plugin names (#34420) 2018-01-04 16:47:23 -06:00
lookup Speed up a few more tests by mocking time.sleep (#61186) 2019-08-22 14:33:34 -05:00
shell Add support for Windows hosts in the SSH connection plugin (#47732) 2019-03-07 16:38:02 -08:00
strategy T woerner max concurrent (#60702) 2019-08-28 18:47:39 -05:00
terminal unit tests: remove unused imports (#60462) 2019-08-13 19:21:43 +02:00
vars Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
__init__.py Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
test_plugins.py Unit tests: remove unused imports (#59812) 2019-08-02 17:18:14 +02:00