aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-04-21 00:45:06 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-04-21 00:45:06 +0200
commit9f430d51eec914c00249b9dc73e82500d312d7af (patch)
treebbd2241ccad3fa771109b99f68668ef4f990e85e
parentc2f33e53cf694819878f95b7200c3a3abebe52dc (diff)
downloadPuppet-9f430d51eec914c00249b9dc73e82500d312d7af.tar.gz
Puppet-9f430d51eec914c00249b9dc73e82500d312d7af.tar.zst
Puppet-9f430d51eec914c00249b9dc73e82500d312d7af.zip
Make environment mandatory to install script
-rwxr-xr-xbin/install_script.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/install_script.sh b/bin/install_script.sh
index bd7f38b..36cc594 100755
--- a/bin/install_script.sh
+++ b/bin/install_script.sh
@@ -5,6 +5,9 @@ cat <<EOF
5$(basename $0) [options] 5$(basename $0) [options]
6 --help,-h This help 6 --help,-h This help
7 7
8 Please chose environment:
9 --environment env Environment to use for the install
10
8 One of the following options is necessary: 11 One of the following options is necessary:
9 --instance-id id Id of the cloud instance 12 --instance-id id Id of the cloud instance
10 --vps-id id Id of the vps 13 --vps-id id Id of the vps
@@ -17,14 +20,12 @@ $(basename $0) [options]
17 --no-reboot-start Don't reboot to rescue at the beginning 20 --no-reboot-start Don't reboot to rescue at the beginning
18 --no-reboot-end Don't reboot to normal at the end 21 --no-reboot-end Don't reboot to normal at the end
19 --git-branch branch Use another puppet branch (default: master) 22 --git-branch branch Use another puppet branch (default: master)
20 --environment env Environment to use for the install (default: production)
21EOF 23EOF
22} 24}
23 25
24set -e 26set -e
25 27
26git_branch=master 28git_branch=master
27environment=production
28host_user="" 29host_user=""
29password="" 30password=""
30T="" 31T=""
@@ -89,7 +90,7 @@ while [ -n "$1" ]; do
89 shift 90 shift
90done 91done
91 92
92if [ -z "$T" -o -z "$host_id" ]; then 93if [ -z "$T" -o -z "$host_id" -o -z "$environment" ]; then
93 usage 94 usage
94 exit 1 95 exit 1
95fi 96fi