From 8980905319b39bc9d712a5aa7f834467b06f40b2 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 7 Feb 2020 14:09:00 +1100 Subject: [PATCH] launch-node.py : make sure new inventory comes last If you happen to be booting a replacement host, you don't want ansible to pick up the current host from the current inventory. Put the new server's inventory last in the list so it overrides and before it. Change-Id: I3f1edfb95924dae0256f969bc740f1141e291c25 --- launch/launch-node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch/launch-node.py b/launch/launch-node.py index 21b35c70a3..ae4684d39c 100755 --- a/launch/launch-node.py +++ b/launch/launch-node.py @@ -177,10 +177,10 @@ def bootstrap_server(server, key, name, volume_device, keep, t.start() inventory_list = ( - jobdir.inventory_root, '/opt/system-config/inventory/openstack.yaml', '/opt/system-config/inventory/groups.yaml', '/etc/ansible/hosts/emergency.yaml', + jobdir.inventory_root, ) inventory_cmds = [v for e in inventory_list for v in ('-i', e)] ansible_cmd = ['ansible-playbook', '--flush-cache' ] + \