$(basename $0) [options]
--help,-h This help
+ Please chose environment:
+ --environment env Environment to use for the install
+
One of the following options is necessary:
--instance-id id Id of the cloud instance
--vps-id id Id of the vps
+ --hetzner-id id Id of the Hetzner server
Optional arguments:
--password password Password of the host (only useful in case of no reboot and vps)
--no-reboot-start Don't reboot to rescue at the beginning
--no-reboot-end Don't reboot to normal at the end
--git-branch branch Use another puppet branch (default: master)
- --environment env Environment to use for the install (default: production)
EOF
}
set -e
git_branch=master
-environment=production
host_user=""
password=""
T=""
T="ovh_vps_ssd"
shift
;;
+ --hetzner-id)
+ host_id="$2"
+ if [ -z "$host_user" ]; then
+ host_user="root"
+ fi
+ [ -n "$T" ] && usage && exit 1
+ T="hetzner_server"
+ shift
+ ;;
--password)
password="$2"
shift
shift
done
-if [ -z "$T" -o -z "$host_id" ]; then
+if [ -z "$T" -o -z "$host_id" -o -z "$environment" ]; then
usage
exit 1
fi