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
If role_networks is not defined, the jinja parsing fails because
NoneType is not iterable when doing a 'if value in none_type_var'
Change-Id: Ie89e6f914f11ad337e79b7af89568fd1a74568d1
Closes-Bug: #1837644
Once tripleo-heat-templates is migrated to use the template mode of the
tripleo-ssh-known-hosts role, the old mode that used the ssh_known_hosts
variable as input can be removed.
Since the non-namespaced var (ssh_known_hosts) is no longer used, the
entire molecule/legacy_vars dir is also removed.
Depends-On: I10d0de42acc0b88b7947b464e976b5d0b9067ca2
Change-Id: I4a2002fa42337e115f9679fcf2f2db71308389d6
Adds the ability to generate the ssh known hosts configuration using a
jinja2 template. The previous behavior is maintained before
tripleo-heat-templates is migrated over to use the new template mode.
Once tripleo-heat-templates is migrated, the old mode that relied on the
tripleo_ssh_known_hosts variable can be removed.
Change-Id: Ie6546c74b452be322e7a4d046d2d58b42c6ccee8
The tripleo-ssh-known-hosts from tripleo-common has been imported
into tripleo-ansible. Role tests have been added using molecule
testing the loading and unloading capbailities of this role.
Documentation hooks have been created showing how the role can
be used.
Change-Id: Id5809909b304860b25233e81bc7abeec3b0d8890
Signed-off-by: Kevin Carter <kevin@cloudnull.com>