Merge "launch.py: Fix inventory list"
This commit is contained in:
commit
a4566bab0c
@ -170,20 +170,19 @@ def bootstrap_server(server, key, name, volume_device, keep,
|
||||
t.daemon = True
|
||||
t.start()
|
||||
|
||||
inventory_list = ','.join([
|
||||
inventory_list = (
|
||||
jobdir.inventory_root,
|
||||
'/opt/system-config/inventory/openstack.yaml',
|
||||
'/opt/system-config/inventory/groups.yaml',
|
||||
'/opt/system-config/inventory/emergency.yaml',
|
||||
])
|
||||
ansible_cmd = [
|
||||
'ansible-playbook',
|
||||
'--flush-cache',
|
||||
'-i', inventory_list, '-l', name,
|
||||
'--private-key={key}'.format(key=jobdir.key),
|
||||
"--ssh-common-args='-o StrictHostKeyChecking=no'",
|
||||
'-e', 'target={name}'.format(name=name),
|
||||
]
|
||||
)
|
||||
inventory_cmds = [v for e in inventory_list for v in ('-i', e)]
|
||||
ansible_cmd = ['ansible-playbook', '--flush-cache' ] + \
|
||||
inventory_cmds + \
|
||||
['-l', name,
|
||||
'--private-key={key}'.format(key=jobdir.key),
|
||||
"--ssh-common-args='-o StrictHostKeyChecking=no'",
|
||||
'-e', 'target={name}'.format(name=name)]
|
||||
|
||||
# Run the base playbook limited to just this server we just created
|
||||
for playbook in [
|
||||
|
Loading…
Reference in New Issue
Block a user