Update Device Types feature in Init script
This commit is contained in:
@@ -15,9 +15,12 @@ wx-init(){
|
||||
|
||||
if [[ ! -z ${args['device-type']} ]]
|
||||
then
|
||||
if [[ ${args['device-type']} == "server" || ${args['device-type']} == "workstation" ]]
|
||||
if [[ ${args['device-type']} == "server" ]]
|
||||
then
|
||||
DEVICE_TYPE="${args['device-type']}"
|
||||
DEVICE_TYPE="Server"
|
||||
elif [[ ${args['device-type']} == "workstation" ]]
|
||||
then
|
||||
DEVICE_TYPE="Workstation"
|
||||
else
|
||||
wxi-content status "Device Type" "Invalid"
|
||||
wxi-stop
|
||||
@@ -51,7 +54,7 @@ wx-init(){
|
||||
echo "---" > ~/.ansible/vars.yml
|
||||
echo "hostname: $HOSTNAME" >> ~/.ansible/vars.yml
|
||||
echo "info:" >> ~/.ansible/vars.yml
|
||||
echo " type: $TYPE" >> ~/.ansible/vars.yml
|
||||
echo " type: $DEVICE_TYPE" >> ~/.ansible/vars.yml
|
||||
echo "config:" >> ~/.ansible/vars.yml
|
||||
echo " identity:" >> ~/.ansible/vars.yml
|
||||
echo " vault:" >> ~/.ansible/vars.yml
|
||||
|
||||
Reference in New Issue
Block a user