From d360e25a9cc16679c2301bc41ecab0aa5f4f95fd Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 25 May 2021 12:39:58 -0400 Subject: [PATCH] scripts/ansible: Clarify output --- scripts/ansible | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index 6ba6022d3..a0a585faa 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -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"