diff --git a/ansible_install.sh b/ansible_install.sh index 68c5f43..0d29e62 100755 --- a/ansible_install.sh +++ b/ansible_install.sh @@ -2,4 +2,4 @@ [ `id -u` -ne 0 ] && exit 1 echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" >> /etc/apt/sources.list apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 -apt update && apt install ansible +apt update && apt install -y ansible diff --git a/ansible_provisioning.sh b/ansible_provisioning.sh index 4dd71ee..e8f593b 100755 --- a/ansible_provisioning.sh +++ b/ansible_provisioning.sh @@ -1,4 +1,4 @@ #!/bin/bash [ `id -u` -ne 0 ] && exit 1 -ssh-keygen -t rsa -b 4096 -N '' -f ~/.ssh/id_rsa +test -f ~/.ssh/id_rsa.pub || ssh-keygen -t rsa -b 4096 -N '' -f ~/.ssh/id_rsa ansible-playbook -i inventory/hosts --skip-tags swarm --diff -v galera.yml