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:
parent
2a6b9dde4a
commit
d360e25a9c
1 changed files with 9 additions and 6 deletions
|
@ -76,7 +76,7 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
# Why 'noninteractive' appears needed:
|
# Why 'noninteractive' appears needed:
|
||||||
# https://github.com/iiab/iiab/issues/564#issuecomment-347264985
|
# 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 'Alternative: /opt/iiab/iiab/scripts/ansible-2.9.x ("Slow Food")\n'
|
||||||
|
|
||||||
echo -e "RECOMMENDED PREREQUISITES:"
|
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:
|
# 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 | awk '{print $2}')
|
||||||
#CURR_VER=$(ansible --version | head -1 | sed -e 's/.* //')
|
#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
|
else
|
||||||
echo -e "ANSIBLE NOT FOUND ON THIS COMPUTER -- LET'S TRY TO INSTALL IT!"
|
echo -e "ANSIBLE NOT FOUND ON THIS COMPUTER -- LET'S TRY TO INSTALL IT!"
|
||||||
fi
|
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)
|
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 "\napt update; apt install of python3-* / virtualenv packages explained at:"
|
||||||
echo -e "https://github.com/iiab/iiab/blob/master/scripts/ansible.md"
|
echo -e "https://github.com/iiab/iiab/blob/master/scripts/ansible.md\n"
|
||||||
echo -e "Then: pip3 install ansible-core\n"
|
|
||||||
$APT_PATH/apt update
|
$APT_PATH/apt update
|
||||||
#$APT_PATH/apt -y --allow-downgrades install ansible-core \
|
#$APT_PATH/apt -y --allow-downgrades install ansible-core \
|
||||||
$APT_PATH/apt -y --allow-downgrades install \
|
$APT_PATH/apt -y --allow-downgrades install \
|
||||||
python3-pymysql python3-psycopg2 python3-passlib python3-pip \
|
python3-pymysql python3-psycopg2 python3-passlib python3-pip \
|
||||||
python3-setuptools python3-packaging python3-venv virtualenv
|
python3-setuptools python3-packaging python3-venv virtualenv
|
||||||
|
|
||||||
|
echo -e "\n'pip3 install ansible-core' will now run:\n"
|
||||||
pip3 install ansible-core
|
pip3 install ansible-core
|
||||||
|
|
||||||
# (Re)running collection installs appears safe, with --force-with-deps to force
|
# (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
|
#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 '[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 " ansible --version"
|
||||||
echo -e " pip show ansible-core"
|
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"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue