diff --git a/scripts/ansible b/scripts/ansible index 868ed67cc..63565717e 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -5,7 +5,7 @@ URL="NA" # TODO add check for version - to revese patching if upgrading if [ $(which ansible-playbook) ]; then VER=`ansible --version|head -n 1|cut -f 2 -d " "` - GOOD_VER="$VER | grep 2.4 | wc -l" + GOOD_VER=`echo $VER | grep 2.4 | wc -l` if [ $VER = "2.2.0.0" ]; then echo "Ansible $VER installed updating to 2.4.0" pip install --upgrade ansible==2.4.0 --disable-pip-version-check @@ -54,6 +54,7 @@ fi if [ -f /etc/debian_version ]; then # might pickup usbmount confirm ppa location echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" >> /etc/apt/sources.list + apt-get -y install dirmngr apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 apt-get -y update apt-get -y install ansible git python-pip python-setuptools python-wheel patch @@ -63,6 +64,7 @@ if [ -f /etc/debian_version ]; then fi if [ `grep -qi ubuntu /etc/lsb-release` ] || [ `grep -qi ubuntu /etc/os-release` ]; then echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" >> /etc/apt/sources.list + apt-get -y install dirmngr apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 apt-get -y update # confirm PPA location @@ -77,6 +79,7 @@ fi # Has 2.2.1 if [ `grep -qi raspbian /etc/*elease` ]; then echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" >> /etc/apt/sources.list + apt-get -y install dirmngr apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 apt-get -y update apt-get -y install ansible git python-pip python-setuptools python-wheel patch