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