mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
shellcheck and whitespace
This commit is contained in:
parent
671343b9e9
commit
e1722645c5
1 changed files with 4 additions and 5 deletions
|
@ -96,7 +96,7 @@ echo -e " /etc/apt/sources.list and /etc/apt/sources.list.d/*\n"
|
||||||
echo -e "IIAB INSTALL INSTRUCTIONS: (OLDER, MANUAL APPROACH)"
|
echo -e "IIAB INSTALL INSTRUCTIONS: (OLDER, MANUAL APPROACH)"
|
||||||
echo -e "https://github.com/iiab/iiab/wiki/IIAB-Installation#do-everything-from-scratch\n"
|
echo -e "https://github.com/iiab/iiab/wiki/IIAB-Installation#do-everything-from-scratch\n"
|
||||||
|
|
||||||
if [ $(command -v ansible) ]; then # "command -v" is POSIX compliant; also catches built-in commands like "cd"
|
if [ "$(command -v ansible)" ]; then # "command -v" is POSIX compliant; also catches built-in commands like "cd"
|
||||||
CURR_VER=$(ansible --version | head -1 | cut -f 2- -d " ")
|
CURR_VER=$(ansible --version | head -1 | cut -f 2- -d " ")
|
||||||
# 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}')
|
||||||
|
@ -201,14 +201,13 @@ $APT_PATH/apt -y install python3-venv
|
||||||
|
|
||||||
# 2023-03-22: OS's like Ubuntu 23.04 and Debian 12 (e.g. with Python 3.11+) ask
|
# 2023-03-22: OS's like Ubuntu 23.04 and Debian 12 (e.g. with Python 3.11+) ask
|
||||||
# that virtual environments (venv) be used to safely isolate pip installs:
|
# that virtual environments (venv) be used to safely isolate pip installs:
|
||||||
# https://peps.python.org/pep-0668
|
# https://peps.python.org/pep-0668
|
||||||
echo -e "\nCreate virtual environment for Ansible"
|
echo -e "\nCreate virtual environment for Ansible"
|
||||||
python3 -m venv /usr/local/ansible
|
python3 -m venv /usr/local/ansible
|
||||||
/usr/local/ansible/bin/python3 -m pip install --upgrade ansible-core
|
/usr/local/ansible/bin/python3 -m pip install --upgrade ansible-core
|
||||||
echo -e "\nCreate symlinks /usr/local/bin/ansible* -> /usr/local/ansible/bin/ansible*"
|
echo -e "\nCreate symlinks /usr/local/bin/ansible* -> /usr/local/ansible/bin/ansible*"
|
||||||
cd /usr/local/ansible/bin
|
for bin in /usr/local/ansible/bin/ansible*; do
|
||||||
for bin in $(ls ansible*); do
|
ln -sf /usr/local/ansible/bin/"$bin" /usr/local/bin/"$bin"
|
||||||
ln -sf /usr/local/ansible/bin/$bin /usr/local/bin/$bin
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# (Re)running collection installs appears safe, with --force-with-deps to force
|
# (Re)running collection installs appears safe, with --force-with-deps to force
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue