Add clause in localhost-deploy to use apk if found
This commit is contained in:
parent
e09604540d
commit
975b2ea938
@ -9,7 +9,13 @@
|
|||||||
set -e
|
set -e
|
||||||
if ! command -v ansible > /dev/null 2>&1; then
|
if ! command -v ansible > /dev/null 2>&1; then
|
||||||
printf "Installing Ansible and related packages\n"
|
printf "Installing Ansible and related packages\n"
|
||||||
sudo apt-get install python3-pip python3-setuptools -y
|
if command -v apt > /dev/null 2>&1; then
|
||||||
|
printf "Installing via APT\n"
|
||||||
|
sudo apt-get install python3-pip python3-setuptools -y
|
||||||
|
elif command -v pkg > /dev/null 2>&1; then
|
||||||
|
printf "Installing via APK\n"
|
||||||
|
sudo apk add py3-pip py3-setuptools
|
||||||
|
fi
|
||||||
sudo pip3 install ansible
|
sudo pip3 install ansible
|
||||||
fi
|
fi
|
||||||
ansible-playbook site.yml -l "$HOSTNAME" -e "ansible_user=$USER ansible_connection=local ansible_host=localhost" --ask-become-pass --ask-vault-pass "$@"
|
ansible-playbook site.yml -l "$HOSTNAME" -e "ansible_user=$USER ansible_connection=local ansible_host=localhost" --ask-become-pass --ask-vault-pass "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user