From f32afcff428eefbc1a7c48e5f9558db88e4fc04e Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 5 Dec 2017 12:42:52 -0600 Subject: [PATCH] must use .list for apt repos --- scripts/ansible | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 0556a060f..44fd751b6 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -35,7 +35,7 @@ if ! [ $(which ansible-playbook) ]; then if [ ! `grep -qi ansible /etc/apt/sources.list` ] && [ ! -f /etc/apt/sources.list.d/ansible ]; then apt-get -y install dirmngr python-pip python-setuptools python-wheel patch echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" \ - >> /etc/apt/sources.list.d/ansible + >> /etc/apt/sources.list.d/ansible.list apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 fi FOUND="yes" @@ -61,7 +61,9 @@ else echo "Please use pip package manager to update ansible" exit 0 fi - if [[ ! `grep -qi ansible /etc/apt/sources.list` ]] || [ ! -f /etc/apt/sources.list.d/ansible* ]; then + if [[ `grep -qi ansible /etc/apt/sources.list` ]] || [ -f /etc/apt/sources.list.d/ansible*.list ]; then + echo "repos found" + else echo "Upstream ansible source repo not found, please uninstall ansible and re-run this script" exit 1 fi