diff --git a/bin/bootstrap.sh b/bin/bootstrap.sh index 8edecfb..3eb7e2e 100755 --- a/bin/bootstrap.sh +++ b/bin/bootstrap.sh @@ -146,3 +146,12 @@ display_devstools_header "- $bomsg_000" # Run install with sudo sudo bash -c "$(declare -f load_bootstrap_msg; declare -f install); install $BIN_HOME $BIN_LIBS $BIN_MESG $BIN_LANG" +result=$? + +# Run install ansible with regular user +if [ $result -eq 0 ] +then + # Load bootstrap bash library + source $BIN_HOME/$BIN_LIBS/bootstrap.lib + ansible_install +fi diff --git a/bin/lib/bootstrap.lib b/bin/lib/bootstrap.lib index d7e1cea..eb0fec2 100755 --- a/bin/lib/bootstrap.lib +++ b/bin/lib/bootstrap.lib @@ -211,6 +211,20 @@ function podman_install() { } +function ansible_install() { + + echo "${anmsg_001}" + python3 -m pip install --upgrade pip + python3 -m pip install --user ansible + if [ $? -eq 0 ] + then + echo "${anmsg_003}" + return 0 + fi + echo "${anmsg_002}" + exit 1 + +} # Set how unprivileged port 53 (dns) function unprivileged_port53() { diff --git a/bin/msg/bootstrap.es b/bin/msg/bootstrap.es index b7d2717..55216c1 100644 --- a/bin/msg/bootstrap.es +++ b/bin/msg/bootstrap.es @@ -37,6 +37,10 @@ pymsg_004="Dialog instalado satisfactoriamente" pdmsg_001="Instalando Podman..." pdmsg_003="Podman fue instalado satisfactoriamente" +anmsg_001="Instalando Ansible..." +anmsg_003="Error en la instalaciĆ³n de Ansible!" +anmsg_003="Ansible fue instalado satisfactiramente" + domsg_005="----> Docker previamente instalado, desinstale para poder instalar PODMAN o utilice DOCKER" bomsg_101_1="Uso:"