]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
install-ansible: exit if ansible is installed 869/head
authorSébastien Han <seb@redhat.com>
Wed, 6 Jul 2016 08:55:58 +0000 (10:55 +0200)
committerSébastien Han <seb@redhat.com>
Wed, 6 Jul 2016 08:55:58 +0000 (10:55 +0200)
fixes: #868

Signed-off-by: Sébastien Han <seb@redhat.com>
install-ansible.sh

index 27a609f16542dd02453758a9f14cd6dd0d19da74..d2ab291080557f507fa1dff296e5309a1e0f501c 100755 (executable)
@@ -5,6 +5,13 @@
 
 set -e
 
+if ansible --version &> /dev/null ; then
+  echo "Ansible is already installed."
+  echo "Doing nothing."
+  echo "Exiting now."
+  exit 1
+fi
+
 if [[ $EUID -ne 0 ]]; then
     echo "You are NOT running this script as root."
     echo "You should."