tripleo-ansible/tripleo_ansible/roles/tripleo-ssh-known-hosts/tasks
James Slagle 4157d7a5df Use blockinfile for tripleo-ssh-known-hosts
lineinfile combined with with_items was very inefficient for this task.
Given that each node's hostkey is added to every other host, it resulted
in O(n²) performance.

Additional networks per node also worsened the problem. For example, in
a 100 node deployment, with 4 networks per node, this task would need to
be executed 40,000 times (100 * 100 * 4).

Switching to use blockinfile brings the performance back to O(n), and
also removes any dependency on the number of networks per node.

Change-Id: Id51d27f53abf3421c29a11065377e9303ad68d79
2019-09-05 16:54:13 -04:00
..
main.yml Use blockinfile for tripleo-ssh-known-hosts 2019-09-05 16:54:13 -04:00