task 추가 및 수정
This commit is contained in:
@@ -1 +1,32 @@
|
||||
ANSIBLE_STDOUT_CALLBACK=debug ANSIBLE_DISPLAY_SKIPPED_HOSTS=false ansible-playbook -i hosts -e target=$1 etcd-restore.yml
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: etcd-restore.sh ['host' or 'member']"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
more lic.txt
|
||||
|
||||
echo ''
|
||||
|
||||
while [ -z $prompt ];
|
||||
do read -p "DO YOU ACCEPT THE TERMS OF THIS LINCESE AGREEMENT? [y/n] : " choice;
|
||||
case "$choice" in
|
||||
y|Y ) prompt=true; break;;
|
||||
n|N ) exit 0;;
|
||||
esac;
|
||||
done;
|
||||
|
||||
if which ansible-playbook >/dev/null; then
|
||||
if [ $1 == "host" ]; then
|
||||
ANSIBLE_STDOUT_CALLBACK=debug ANSIBLE_DISPLAY_SKIPPED_HOSTS=false ansible-playbook -i hosts -e target=host etcd-restore.yml
|
||||
elif [ $1 == "member" ]; then
|
||||
ANSIBLE_STDOUT_CALLBACK=debug ANSIBLE_DISPLAY_SKIPPED_HOSTS=false ansible-playbook -i hosts -e target=member etcd-restore.yml
|
||||
else
|
||||
echo "Usage: etcd-restore.sh ['host' or 'member']"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo 'Error: ansible is not installed.' >&2
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user