Duncan Martin Walker bf10b55c9e Use parallel git clone
The git clones of required roles contained in ansible-role-requirements
are currently single-threaded and can take a significant time when
running scripts/bootstrap-ansible.sh. A new module, git_requirements has
been implemented in order to multithreaded this, which takes
input as provided in clone_roles in get-ansible-requirements.yml.

The result of this implementation is a sizeable speed increase (~factor
of five across the full bootstrap_ansible script) for the git clone
repos task when tested on a two core VM.

The new module requires all repo information ahead of time in order to
distribute the clones between threads. This is unlike the previous
implementation, which performed the clones in sequence and generated
the appropriate data (destination URL, default refspec etc) per loop
iteration. This information is now generated within the ansible module,
with defaults supplied at the task level.

The retry and delay parameters used for the loop with the built in ansible
git module have been re-implemented in the new module to allow force
cloning, alongside retries and time delays for failed clones.
Change-Id: I3cdb248204c5e03ef98803d366e3a19ed7f8bdd8
2020-11-09 15:22:06 +00:00
..
2020-11-09 15:22:06 +00:00