mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update ansible
This commit is contained in:
parent
493f51aa53
commit
4d9c90dbcb
1 changed files with 9 additions and 7 deletions
|
@ -48,10 +48,12 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant
|
||||||
apt update
|
apt update
|
||||||
#apt -y install dirmngr python-pip python-setuptools python-wheel patch
|
#apt -y install dirmngr python-pip python-setuptools python-wheel patch
|
||||||
apt -y install dirmngr
|
apt -y install dirmngr
|
||||||
|
if ! grep -qx "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" /etc/apt/sources.list /etc/apt/sources.list.d/*.list; then
|
||||||
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" \
|
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" \
|
||||||
>> /etc/apt/sources.list.d/iiab-ansible.list
|
> /etc/apt/sources.list.d/iiab-ansible.list
|
||||||
#echo "deb http://ppa.launchpad.net/ansible/ansible-2.4/ubuntu xenial main" \
|
#echo "deb http://ppa.launchpad.net/ansible/ansible-2.4/ubuntu xenial main" \
|
||||||
# >> /etc/apt/sources.list.d/iiab-ansible.list
|
# >> /etc/apt/sources.list.d/iiab-ansible.list
|
||||||
|
fi
|
||||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
|
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -73,13 +75,13 @@ else
|
||||||
#elif (grep -qi ansible /etc/apt/sources.list) || (ls /etc/apt/sources.list.d/*ansible*.list >/dev/null 2>&1) ; 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
|
#elif grep -r ansible /etc/apt; then
|
||||||
# "grep -x" matches whole lines (confirms it's not commented out)
|
# "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
|
elif grep -qx "deb http://ppa.launchpad.net/ansible/ansible/ubuntu .* main" /etc/apt/sources.list /etc/apt/sources.list.d/*.list; then
|
||||||
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 '\nThe latest Ansible will be installed using line "deb http://ppa.launchpad.net/ansible/ansible/ubuntu ... 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'
|
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
|
grep ansible /etc/apt/sources.list /etc/apt/sources.list.d/*.list
|
||||||
echo -e '\n'
|
echo -e '\n'
|
||||||
else
|
else
|
||||||
echo -e '\nEXITING: Ansible repo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" not found in /etc/apt/sources.list or /etc/apt/sources.list.d/*.list'
|
echo -e '\nEXITING: Ansible repo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu ... main" not found in /etc/apt/sources.list or /etc/apt/sources.list.d/*.list'
|
||||||
echo -e '\nPLEASE UNINSTALL ANSIBLE (run "apt purge ansible" or "pip uninstall ansible", depending how Ansible was originally installed) THEN RE-RUN THIS SCRIPT.'
|
echo -e '\nPLEASE UNINSTALL ANSIBLE (run "apt purge ansible" or "pip uninstall ansible", depending how Ansible was originally installed) THEN RE-RUN THIS SCRIPT.'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue