mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 05:45:06 +03:00
Add throwing error when specifying unsupported os in Vagrant (#9965)
This commit is contained in:
7
Vagrantfile
vendored
7
Vagrantfile
vendored
@@ -83,6 +83,13 @@ $playbook ||= "cluster.yml"
|
|||||||
|
|
||||||
host_vars = {}
|
host_vars = {}
|
||||||
|
|
||||||
|
# throw error if os is not supported
|
||||||
|
if ! SUPPORTED_OS.key?($os)
|
||||||
|
puts "Unsupported OS: #{$os}"
|
||||||
|
puts "Supported OS are: #{SUPPORTED_OS.keys.join(', ')}"
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
|
||||||
$box = SUPPORTED_OS[$os][:box]
|
$box = SUPPORTED_OS[$os][:box]
|
||||||
# if $inventory is not set, try to use example
|
# if $inventory is not set, try to use example
|
||||||
$inventory = "inventory/sample" if ! $inventory
|
$inventory = "inventory/sample" if ! $inventory
|
||||||
|
|||||||
Reference in New Issue
Block a user