1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

scripts/ansible: Clarify output

This commit is contained in:
A Holt 2021-05-25 12:39:58 -04:00 committed by GitHub
parent 2a6b9dde4a
commit d360e25a9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,7 +76,7 @@ export DEBIAN_FRONTEND=noninteractive
# Why 'noninteractive' appears needed:
# https://github.com/iiab/iiab/issues/564#issuecomment-347264985
echo -e "\n\nYOU ARE RUNNING: /opt/iiab/iiab/scripts/ansible (TO INSTALL ANSIBLE)\n"
echo -e "\n\nYOU ARE RUNNING: /opt/iiab/iiab/scripts/ansible (TO INSTALL ANSIBLE ETC)\n"
#echo -e 'Alternative: /opt/iiab/iiab/scripts/ansible-2.9.x ("Slow Food")\n'
echo -e "RECOMMENDED PREREQUISITES:"
@ -96,7 +96,8 @@ if [ $(command -v ansible) ]; then # "command -v" is POSIX compliant; also ca
# Above works with 'ansible [core 2.11.0rc2]' -- these old ways do not:
#CURR_VER=$(ansible --version | head -1 | awk '{print $2}')
#CURR_VER=$(ansible --version | head -1 | sed -e 's/.* //')
echo -e "CURRENTLY INSTALLED ANSIBLE: $CURR_VER -- LET'S TRY TO UPGRADE IT!"
echo -e "CURRENTLY INSTALLED ANSIBLE: $CURR_VER"
#echo -e "CURRENTLY INSTALLED ANSIBLE: $CURR_VER -- LET'S TRY TO UPGRADE IT!"
else
echo -e "ANSIBLE NOT FOUND ON THIS COMPUTER -- LET'S TRY TO INSTALL IT!"
fi
@ -149,13 +150,14 @@ echo -e 'ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n
grep '^deb .*ansible' /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep -v '^/etc/apt/sources.list.d/iiab-ansible.list:' || true # Override bash -e (instead of aborting at 1st error)
echo -e "\napt update; apt install of python3-* / virtualenv packages explained at:"
echo -e "https://github.com/iiab/iiab/blob/master/scripts/ansible.md"
echo -e "Then: pip3 install ansible-core\n"
echo -e "https://github.com/iiab/iiab/blob/master/scripts/ansible.md\n"
$APT_PATH/apt update
#$APT_PATH/apt -y --allow-downgrades install ansible-core \
$APT_PATH/apt -y --allow-downgrades install \
python3-pymysql python3-psycopg2 python3-passlib python3-pip \
python3-setuptools python3-packaging python3-venv virtualenv
echo -e "\n'pip3 install ansible-core' will now run:\n"
pip3 install ansible-core
# (Re)running collection installs appears safe, with --force-with-deps to force
@ -177,7 +179,8 @@ ansible-galaxy collection install --force-with-deps \
#mkdir -p /etc/ansible # LIKELY REDUNDANT, due to above installation of Ansible
#echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts # LIKELY REDUNDANT, due to https://github.com/iiab/iiab/blob/master/ansible_hosts
echo -e "SUCCESS INSTALLING ANSIBLE! PLEASE VERIFY WITH COMMANDS LIKE:"
echo -e "\n\nSUCCESS! PLEASE VERIFY ANSIBLE WITH COMMANDS LIKE:\n"
echo -e " ansible --version"
echo -e " pip show ansible-core"
echo -e " apt -a list ansible-core\n\n"
echo -e " apt -a list ansible-core"
echo -e "WARNING: You might need to start a new Linux shell, so /usr/local/bin works.\n\n"