1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-29 18:50:08 +03:00

M #-: OneProvision: run only ceph pl. with -limit (#1972)

This commit is contained in:
Jan Orel 2022-04-25 13:27:13 +02:00 committed by Ruben S. Montero
parent 78b9a37590
commit 63829349e8
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -149,7 +149,12 @@ module OneProvision
cmd << "ansible-playbook #{ANSIBLE_ARGS}"
@inventories.each {|i| cmd << " -i #{i}" }
@group_vars.each {|g| cmd << " -e @#{g}" }
cmd << " --limit #{only_hosts.join(',')}" if only_hosts
# if adding host then first (main playbook)
# run on all hosts, others with `--limit ${only_hosts}`
cmd << " --limit #{only_hosts.join(',')}" \
if only_hosts && @playbook.first != playbook
cmd << " #{ANSIBLE_LOCATION}/#{playbook}.yml"
o, _e, s = Driver.run(cmd, true)