diff --git a/scripts/ansible b/scripts/ansible index 1e0f5f54d..be06ffc8d 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -72,9 +72,8 @@ else #elif [[ `grep -qi ansible /etc/apt/sources.list` ]] || [ -f /etc/apt/sources.list.d/ansible*.list ]; then #elif (grep -qi ansible /etc/apt/sources.list) || (ls /etc/apt/sources.list.d/*ansible*.list >/dev/null 2>&1) ; then #elif grep -r ansible /etc/apt; then + # "grep -x" matches whole lines (confirms it's not commented out) elif grep -qx "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" /etc/apt/sources.list /etc/apt/sources.list.d/*.list; then - #echo "Ansible repo(s) found within /etc/apt/sources.list*" - #echo -e '\nCONSIDER MANUAL INTERVENTION:\nANSIBLE REPO(S) FOUND WITHIN /etc/apt/sources.list AND/OR /etc/apt/sources.list.d/*ansible*.list -- SHOULD CONTAIN LINE "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" IF YOU WANT THE LATEST ANSIBLE -- AND REMOVE ALL SIMILAR LINES TO ENSURE ANSIBLE UPDATES CLEANLY -- then re-run this script.\n' echo -e '\nThe latest Ansible will be installed using line "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" correctly found in /etc/apt/sources.list and/or /etc/apt/sources.list.d/*.list' echo -e '\nIF *OTHER* ANSIBLE REPOS ARE ALSO FOUND BELOW, PLEASE MANUALLY REMOVE THEM TO ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n' grep ansible /etc/apt/sources.list /etc/apt/sources.list.d/*.list