From d9a53be2c54c1e7c76bfda7f4aeea5dba5997956 Mon Sep 17 00:00:00 2001 From: Beth Date: Fri, 28 Mar 2025 20:58:33 -0500 Subject: [PATCH 1/8] converted to prompts --- scripts/create.sh | 90 ++++++++++++++------------- scripts/shared_scripts/update_dhcp.sh | 2 +- 2 files changed, 47 insertions(+), 45 deletions(-) diff --git a/scripts/create.sh b/scripts/create.sh index 7e5f548..f99dd57 100644 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -1,58 +1,61 @@ #!/bin/bash cd "$(dirname "$(readlink -f "$0")")" -#change to prompts w/ default values -# set defaults + +#define defaults cpu=1 -memory=1024 +memory=1 root_disk=10 variant="archlinux" -path="default" +path="/virtual/disks/" dhcp_opts="" ssh_key_dir="../../identity_files" +dhcp_dir="../../dhcp_files" mac=52:54:00:`openssl rand -hex 1`:`openssl rand -hex 1`:`openssl rand -hex 1` branch="prod" +deflate="y" -usage="$(basename "$0") [options] -n server_name -where: - -n name Name of new vm/server (required, caps allowed, not fqdn) - -c number Numver of CPU cores (default $cpu) - -r number Ram in MB (default $memory) - -d size Root disk size in GB (default 10) - -v variant Linux variant (default archlinux - note should add list of optional variants) - -p image_path Path to image (default /virtual/disks/[name].qcow2) - -m mac_addr Specify mac address to use - if not specified, will use 52:54:00:*:*:* - -s subnet Subnet to place server on (default to 172.16.99.xx) - -i ip_address Specify IP address to assign (default to next available in subnet) - -b branch Specify branch of build_ansible to use (defult prod) - -a attach Attach existing extra disk (use full path to disK, default none) - -f autodeflate Autodeflate memory on use - default true, avoid for ipa-server" +#get variables +numre='^[0-9]+$' +macre='^([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}$' +ipsegre='^[0-255]$' -# process flags -while getopts "h:n:c:r:d:v:p:m:s:i:b:f:" flag -do - case "$flag" in - n) name=${OPTARG};; - c) cpu=${OPTARG};; - r) memory=${OPTARG};; - d) root_disk=${OPTARG};; - v) variant=${OPTARG};; - p) path=${OPTARG};; - m) mac=${OPTARG};; - s) subnet=${OPTARG};dhcp_opts+=" -s $subnet";; - i) ip=${OPTARG};dhcp_opts+=" -i $ip";; - b) branch=${OPTARG};; - a) attach=${OPTARG};; - f) deflate=${OPTARG};; - h) ;& - *) echo "$usage";exit;; - esac -done -dhcp_opts+=" -m $mac" +while true; do read -p "Name of new vm/server (caps allowed, not fqdn): " v;if [ -z $v ]; then echo "error: name is required";else name=$v;break;fi;done +while true; do read -p "Number of CPU cores (default $cpu): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else cpu=$v; break;fi;fi;done +while true; do read -p "Ram in GB (default $memory): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else memory=$v; break;fi;fi;done +while true; do read -p "Root disk size in GB (default $root_disk): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else root_disk=$v; break;fi;fi;done +while true; do read -p "Path to store root disk (default $path): " v;if [ -z $v ]; then path=$path/$name.qcow2 break;else if ! [ -d $v ] ; then echo "error: not a directory";else path=$v/$name.qcow2; break;fi;fi;done +variant=$(dialog --clear --title "Select Linux variant to use" --menu "Choose one of the following options:" 15 40 4 \ +archlinux "Arch Linux" \ +alma "Alma Linux 9" \ +2>&1 >/dev/tty);clear +while true; do read -p "Mac address (default $mac): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $macre ]] ; then echo "error: invalid mac address";else mac=$v; break;fi;fi;done +#add subnet list +eval "dhcp_sets=(`grep "#" $dhcp_dir/subnets/172.* | grep -o 172.* | sort -t . -k 1,1n -k 2,2n -k 3,3n | sed -e "s/:# /.* \'/" | sed -e "s/$/\'/"`)" +subnet=$(dialog --clear --title "Select subnet to use" --menu "Choose one of the following: " 20 100 10 "${dhcp_sets[@]}" 2>&1 >/dev/tty);subnet=`echo $subnet | grep -oP "172.16.\d+"`;clear; +while true; do read -p "Specify last segment of IP (defaults to next available): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else ip=$v; break;fi;fi;done +while true; do read -p "Specify branch of build_ansible to use (defult $branch): " v;if [ -z $v ]; then break;else branch=$v;break;fi;done +while true; do read -p "Full path to extra disk to attach (if applicable, default none): " v;if [ -z $v ]; then break;else if ! [ -f $v ] ; then echo "error: file doesn't exist";else attach=$v;break;fi;fi;done +while true; do read -p "Autodeflate memory on use y/n (default $deflate)? " v;if [ -z $v ]; then break;elif [ "$v" == "y" ];then break; elif [ "$v" == "n" ];then deflate=$v;break;else echo "error: select y or n";fi;done -# get name -shift $(($OPTIND - 1)) +echo "" +echo "Name: $name" +echo "CPU: $cpu" +echo "Ram: $memory" +echo "Root Disk: $root_disk" +echo "Path: $path" +echo "Variant: $variant" +echo "Mac: $mac" +echo "Subnet: $subnet" +echo "IP: $ip" +echo "Branch: $branch" +echo "Attach: $attach" +echo "Deflate: $deflate" +echo "" -if [[ -z "$name" ]];then echo "Server name undefined";echo "$usage";exit;fi +read -p "Is this correct (y/n)? " v;if [ "$v" != "y" ];then "Exiting, restart to reenter info"; exit;fi + +if [ -n $subnet ]; then dhcp_opts=" -s $subnet";fi +if [ -n $ip ]; then dhcp_opts+=" -i $ip";fi lname=`echo $name | tr '[:upper:]' '[:lower:]'` @@ -67,14 +70,13 @@ img=`./shared_scripts/download_install_image.sh $variant` if [ -n "$attach" ]; then attach="--disk ${attach},discard=unmap";fi #determine if deflate should be on -if [ -n "$deflate" ]; then deflate="--memballoon model=virtio,autodeflate=on";else deflate="--memballoon model=virtio";fi +if [[ "$deflate" == "y" ]]; then deflate="--memballoon model=virtio,autodeflate=on";else deflate="--memballoon model=virtio";fi case "$variant" in "archlinux") # create cloud-init - replace by grabbing these directly from git mkdir -p /tmp/cloud-init - echo "#cloud-config - name: root ssh_authorized_keys: diff --git a/scripts/shared_scripts/update_dhcp.sh b/scripts/shared_scripts/update_dhcp.sh index 84ad11e..d137df4 100755 --- a/scripts/shared_scripts/update_dhcp.sh +++ b/scripts/shared_scripts/update_dhcp.sh @@ -52,7 +52,7 @@ if [[ "$ip" -eq "generate" ]];then ip="${subnet}.2" fi else - subnet=`echo $ip | grep -Po "\d+\.\d+\.\d+"` + ip="${subnet}.$ip" fi touch $dhcp_dir/subnets/$subnet -- 2.49.0 From 7f6a7571d9b5ce47ae18579ff4c19d4c8c5581b6 Mon Sep 17 00:00:00 2001 From: Beth Date: Sat, 29 Mar 2025 16:59:44 -0500 Subject: [PATCH 2/8] Added option to skip running ansible build and removed unnecessary if statement --- scripts/create.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/create.sh b/scripts/create.sh index f99dd57..4891094 100644 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -13,6 +13,7 @@ dhcp_dir="../../dhcp_files" mac=52:54:00:`openssl rand -hex 1`:`openssl rand -hex 1`:`openssl rand -hex 1` branch="prod" deflate="y" +ansible="y" #get variables numre='^[0-9]+$' @@ -36,6 +37,7 @@ while true; do read -p "Specify last segment of IP (defaults to next available): while true; do read -p "Specify branch of build_ansible to use (defult $branch): " v;if [ -z $v ]; then break;else branch=$v;break;fi;done while true; do read -p "Full path to extra disk to attach (if applicable, default none): " v;if [ -z $v ]; then break;else if ! [ -f $v ] ; then echo "error: file doesn't exist";else attach=$v;break;fi;fi;done while true; do read -p "Autodeflate memory on use y/n (default $deflate)? " v;if [ -z $v ]; then break;elif [ "$v" == "y" ];then break; elif [ "$v" == "n" ];then deflate=$v;break;else echo "error: select y or n";fi;done +while true; do read -p "Autorun ansible build script (default $ansible)? " v;if [ -z $v ]; then break;elif [ "$v" == "y" ];then break; elif [ "$v" == "n" ];then ansible=$v;break;else echo "error: select y or n";fi;done echo "" echo "Name: $name" @@ -50,6 +52,7 @@ echo "IP: $ip" echo "Branch: $branch" echo "Attach: $attach" echo "Deflate: $deflate" +echo "Run Ansible: $ansible" echo "" read -p "Is this correct (y/n)? " v;if [ "$v" != "y" ];then "Exiting, restart to reenter info"; exit;fi @@ -59,8 +62,6 @@ if [ -n $ip ]; then dhcp_opts+=" -i $ip";fi lname=`echo $name | tr '[:upper:]' '[:lower:]'` -if [[ "$path" -eq "default" ]];then path=/virtual/disks/${name}.qcow2;fi - img=`./shared_scripts/download_install_image.sh $variant` #update DHCP @@ -166,7 +167,9 @@ ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "ansible-galaxy collecti # run ansible ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "mkdir /ansible/; curl -k 'https://git.actcur.com/actcur-ansible/playbook-builder/raw/branch/$branch/build_ansible.sh' -H 'accept: application/raw' -o /ansible/build_ansible.sh;echo "$branch" > /ansible/branch;/bin/bash /ansible/build_ansible.sh" -ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "/bin/bash /ansible/build_ansible.sh" +if [[ "$deflate" == "y" ]]; then + ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "/bin/bash /ansible/build_ansible.sh" +fi ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "git config --global user.email 'ejparker@actcur.com';git config --global user.name 'Beth Parker'" -- 2.49.0 From ec801a1d17e97d75eedb55fe0bdad8a84f6a4d13 Mon Sep 17 00:00:00 2001 From: Beth Date: Sat, 29 Mar 2025 17:02:50 -0500 Subject: [PATCH 3/8] fixed memory --- scripts/create.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/create.sh b/scripts/create.sh index 4891094..7bf8c28 100644 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -64,6 +64,8 @@ lname=`echo $name | tr '[:upper:]' '[:lower:]'` img=`./shared_scripts/download_install_image.sh $variant` +memory=$((memory*1024)) + #update DHCP ./shared_scripts/update_dhcp.sh $dhcp_opts $lname -- 2.49.0 From f2e6b50ea969253b53680054085988a9607cd14f Mon Sep 17 00:00:00 2001 From: Beth Date: Sat, 29 Mar 2025 17:10:09 -0500 Subject: [PATCH 4/8] fix path --- scripts/create.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create.sh b/scripts/create.sh index 7bf8c28..e1bac33 100644 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -24,7 +24,7 @@ while true; do read -p "Name of new vm/server (caps allowed, not fqdn): " v;if [ while true; do read -p "Number of CPU cores (default $cpu): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else cpu=$v; break;fi;fi;done while true; do read -p "Ram in GB (default $memory): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else memory=$v; break;fi;fi;done while true; do read -p "Root disk size in GB (default $root_disk): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else root_disk=$v; break;fi;fi;done -while true; do read -p "Path to store root disk (default $path): " v;if [ -z $v ]; then path=$path/$name.qcow2 break;else if ! [ -d $v ] ; then echo "error: not a directory";else path=$v/$name.qcow2; break;fi;fi;done +while true; do read -p "Path to store root disk (default $path): " v;if [ -z $v ]; then path="$path/$name.qcow2" break;else if ! [ -d $v ] ; then echo "error: not a directory";else path="$v/$name.qcow2"; break;fi;fi;done variant=$(dialog --clear --title "Select Linux variant to use" --menu "Choose one of the following options:" 15 40 4 \ archlinux "Arch Linux" \ alma "Alma Linux 9" \ -- 2.49.0 From 9024a4767740b15b81c458ecd904455824407b10 Mon Sep 17 00:00:00 2001 From: Beth Date: Sat, 29 Mar 2025 17:11:24 -0500 Subject: [PATCH 5/8] fix path --- scripts/create.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create.sh b/scripts/create.sh index e1bac33..a5cce8d 100644 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -24,7 +24,7 @@ while true; do read -p "Name of new vm/server (caps allowed, not fqdn): " v;if [ while true; do read -p "Number of CPU cores (default $cpu): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else cpu=$v; break;fi;fi;done while true; do read -p "Ram in GB (default $memory): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else memory=$v; break;fi;fi;done while true; do read -p "Root disk size in GB (default $root_disk): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else root_disk=$v; break;fi;fi;done -while true; do read -p "Path to store root disk (default $path): " v;if [ -z $v ]; then path="$path/$name.qcow2" break;else if ! [ -d $v ] ; then echo "error: not a directory";else path="$v/$name.qcow2"; break;fi;fi;done +while true; do read -p "Path to store root disk (default $path): " v;if [ -z $v ]; then path="$path/$name.qcow2"; break;else if ! [ -d $v ] ; then echo "error: not a directory";else path="$v/$name.qcow2"; break;fi;fi;done variant=$(dialog --clear --title "Select Linux variant to use" --menu "Choose one of the following options:" 15 40 4 \ archlinux "Arch Linux" \ alma "Alma Linux 9" \ -- 2.49.0 From c97339cdd5c90aaa4667f6ff075ad820c9e9028e Mon Sep 17 00:00:00 2001 From: Beth Date: Sat, 29 Mar 2025 17:14:22 -0500 Subject: [PATCH 6/8] fix path --- scripts/create.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/create.sh b/scripts/create.sh index a5cce8d..d5db7e7 100644 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -39,6 +39,9 @@ while true; do read -p "Full path to extra disk to attach (if applicable, defaul while true; do read -p "Autodeflate memory on use y/n (default $deflate)? " v;if [ -z $v ]; then break;elif [ "$v" == "y" ];then break; elif [ "$v" == "n" ];then deflate=$v;break;else echo "error: select y or n";fi;done while true; do read -p "Autorun ansible build script (default $ansible)? " v;if [ -z $v ]; then break;elif [ "$v" == "y" ];then break; elif [ "$v" == "n" ];then ansible=$v;break;else echo "error: select y or n";fi;done +path=`echo $path | sed -s 's/\/\//\//'` +attach=`echo $attach | sed -s 's/\/\//\//'` + echo "" echo "Name: $name" echo "CPU: $cpu" -- 2.49.0 From 9814574fafdb8c048b43337a499821acf8c226d5 Mon Sep 17 00:00:00 2001 From: Beth Date: Sat, 29 Mar 2025 17:43:04 -0500 Subject: [PATCH 7/8] fixed mac --- scripts/create.sh | 1 + scripts/shared_scripts/get_sever_settings.sh | 61 ++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 scripts/shared_scripts/get_sever_settings.sh diff --git a/scripts/create.sh b/scripts/create.sh index d5db7e7..5c3d29c 100644 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -62,6 +62,7 @@ read -p "Is this correct (y/n)? " v;if [ "$v" != "y" ];then "Exiting, restart to if [ -n $subnet ]; then dhcp_opts=" -s $subnet";fi if [ -n $ip ]; then dhcp_opts+=" -i $ip";fi +dhcp_opts+=" -m $mac" lname=`echo $name | tr '[:upper:]' '[:lower:]'` diff --git a/scripts/shared_scripts/get_sever_settings.sh b/scripts/shared_scripts/get_sever_settings.sh new file mode 100644 index 0000000..91dd808 --- /dev/null +++ b/scripts/shared_scripts/get_sever_settings.sh @@ -0,0 +1,61 @@ +#!/bin/bash +cd "$(dirname "$(readlink -f "$0")")" + +#define defaults +cpu=1 +memory=1 +root_disk=10 +variant="archlinux" +path="/virtual/disks/" +dhcp_opts="" +ssh_key_dir="../../identity_files" +dhcp_dir="../../dhcp_files" +mac=52:54:00:`openssl rand -hex 1`:`openssl rand -hex 1`:`openssl rand -hex 1` +branch="prod" +deflate="y" +ansible="y" + +#get variables +numre='^[0-9]+$' +macre='^([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}$' +ipsegre='^[0-255]$' + +while true; do read -p "Name of new vm/server (caps allowed, not fqdn): " v;if [ -z $v ]; then echo "error: name is required";else name=$v;break;fi;done +while true; do read -p "Number of CPU cores (default $cpu): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else cpu=$v; break;fi;fi;done +while true; do read -p "Ram in GB (default $memory): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else memory=$v; break;fi;fi;done +while true; do read -p "Root disk size in GB (default $root_disk): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else root_disk=$v; break;fi;fi;done +while true; do read -p "Path to store root disk (default $path): " v;if [ -z $v ]; then path="$path/$name.qcow2"; break;else if ! [ -d $v ] ; then echo "error: not a directory";else path="$v/$name.qcow2"; break;fi;fi;done +variant=$(dialog --clear --title "Select Linux variant to use" --menu "Choose one of the following options:" 15 40 4 \ +archlinux "Arch Linux" \ +alma "Alma Linux 9" \ +2>&1 >/dev/tty);clear +while true; do read -p "Mac address (default $mac): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $macre ]] ; then echo "error: invalid mac address";else mac=$v; break;fi;fi;done +#add subnet list +eval "dhcp_sets=(`grep "#" $dhcp_dir/subnets/172.* | grep -o 172.* | sort -t . -k 1,1n -k 2,2n -k 3,3n | sed -e "s/:# /.* \'/" | sed -e "s/$/\'/"`)" +subnet=$(dialog --clear --title "Select subnet to use" --menu "Choose one of the following: " 20 100 10 "${dhcp_sets[@]}" 2>&1 >/dev/tty);subnet=`echo $subnet | grep -oP "172.16.\d+"`;clear; +while true; do read -p "Specify last segment of IP (defaults to next available): " v;if [ -z $v ]; then break;else if ! [[ $v =~ $numre ]] ; then echo "error: not a number";else ip=$v; break;fi;fi;done +while true; do read -p "Specify branch of build_ansible to use (defult $branch): " v;if [ -z $v ]; then break;else branch=$v;break;fi;done +while true; do read -p "Full path to extra disk to attach (if applicable, default none): " v;if [ -z $v ]; then break;else if ! [ -f $v ] ; then echo "error: file doesn't exist";else attach=$v;break;fi;fi;done +while true; do read -p "Autodeflate memory on use y/n (default $deflate)? " v;if [ -z $v ]; then break;elif [ "$v" == "y" ];then break; elif [ "$v" == "n" ];then deflate=$v;break;else echo "error: select y or n";fi;done +while true; do read -p "Autorun ansible build script (default $ansible)? " v;if [ -z $v ]; then break;elif [ "$v" == "y" ];then break; elif [ "$v" == "n" ];then ansible=$v;break;else echo "error: select y or n";fi;done + +path=`echo $path | sed -s 's/\/\//\//'` +attach=`echo $attach | sed -s 's/\/\//\//'` + +echo "" +echo "Name: $name" +echo "CPU: $cpu" +echo "Ram: $memory" +echo "Root Disk: $root_disk" +echo "Path: $path" +echo "Variant: $variant" +echo "Mac: $mac" +echo "Subnet: $subnet" +echo "IP: $ip" +echo "Branch: $branch" +echo "Attach: $attach" +echo "Deflate: $deflate" +echo "Run Ansible: $ansible" +echo "" + +read -p "Is this correct (y/n)? " v;if [ "$v" != "y" ];then "Exiting, restart to reenter info"; exit;fi \ No newline at end of file -- 2.49.0 From 72ea001161cc879d5ace7909b15e9970244b25a6 Mon Sep 17 00:00:00 2001 From: Beth Date: Sat, 29 Mar 2025 22:10:58 -0500 Subject: [PATCH 8/8] moved ansible build into if statement, fixed ansible if statement --- scripts/create.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/create.sh b/scripts/create.sh index 5c3d29c..16ec7ce 100644 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -170,10 +170,13 @@ ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "ansible-galaxy collecti ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "ansible-galaxy collection install community.crypto" ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "ansible-galaxy collection install ansible.posix" -# run ansible -ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "mkdir /ansible/; curl -k 'https://git.actcur.com/actcur-ansible/playbook-builder/raw/branch/$branch/build_ansible.sh' -H 'accept: application/raw' -o /ansible/build_ansible.sh;echo "$branch" > /ansible/branch;/bin/bash /ansible/build_ansible.sh" +# Set up ansible +ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "mkdir /ansible/; curl -k 'https://git.actcur.com/actcur-ansible/playbook-builder/raw/branch/$branch/build_ansible.sh' -H 'accept: application/raw' -o /ansible/build_ansible.sh;echo "$branch" > /ansible/branch" + +if [[ "$ansible" == "y" ]]; then + # Run ansible twice - some configurations don't take effect on first run (i.e. when they are dependent on other configurations) + ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "/bin/bash /ansible/build_ansible.sh" -if [[ "$deflate" == "y" ]]; then ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "/bin/bash /ansible/build_ansible.sh" fi -- 2.49.0