jq 'walk(if type == "object" then del(._comment) else . end)' it-base-linux-ami.commented.json > it-base-linux-ami.json

export AWS_MAX_ATTEMPTS=80
export AWS_POLL_DELAY_SECONDS=60
export ANSIBLE_ROOT="/home/sgaikaiwari/work/it/ansible/"
export SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
export DRIVING_ROOT="$(readlink -f $SCRIPT_PATH/../../../)"
export PACKER_ROOT="$DRIVING_ROOT/infra/packer/base-it-linux"

cd $ANSIBLE_ROOT
packer build -var "source_ami=$1" -var "name=$2" "$PACKER_ROOT/it-base-linux-ami.json"
