From 86d0d7825527b11526a03bc17c1d8eb58937eaa2 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 27 Feb 2019 10:56:32 +1100 Subject: [PATCH] Add --flush-cache to launch.py ansible I managed to leave off the "--image" flag for a Xenial host, so the script created a Bionic host by default. I let that play out, deleted the host and tried again with the correct image, but what ended up happening was the fact cache thought this new host was Bionic, and several ansible roles therefore ran thinking this too, and we ended up with a bad Xenial/Bionic mashup. Clear the cache on node launch to avoid this sort of thing again. I have launched a node with this new option, and it worked. Change-Id: Ie37f562402bed3846f27fbdd4441b5f4dcec7eb2 --- launch/launch-node.py | 1 + 1 file changed, 1 insertion(+) diff --git a/launch/launch-node.py b/launch/launch-node.py index bf1d31d9ba..b5b9abde9f 100755 --- a/launch/launch-node.py +++ b/launch/launch-node.py @@ -178,6 +178,7 @@ def bootstrap_server(server, key, name, volume_device, keep, ]) ansible_cmd = [ 'ansible-playbook', + '--flush-cache', '-i', inventory_list, '-l', name, '--private-key={key}'.format(key=jobdir.key), "--ssh-common-args='-o StrictHostKeyChecking=no'",