From 5313dfbd8ab6a444b629895d19a4fe27c7b18cb0 Mon Sep 17 00:00:00 2001 From: "Mauro Rosero P." Date: Wed, 8 Jan 2025 12:12:17 -0500 Subject: [PATCH] =?UTF-8?q?[FIXED]=20Correcciones:=20-=20bootstrap.sh:=20s?= =?UTF-8?q?e=20corrige=20la=20instalaci=C3=B3n=20de=20ansilbe=20usando=20p?= =?UTF-8?q?aquete=20de=20sistema=20-=20vpn=5Fusers.sh:=20se=20usa=20la=20f?= =?UTF-8?q?unci=C3=B3n=20para=20el=20despliegue=20de=20titulo=20de=20proye?= =?UTF-8?q?cto=20global=20devs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/bootstrap.sh | 19 ++++++++++++++----- bin/vpn_users.sh | 6 +++--- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/bin/bootstrap.sh b/bin/bootstrap.sh index 3eb7e2e..72bd534 100755 --- a/bin/bootstrap.sh +++ b/bin/bootstrap.sh @@ -59,6 +59,8 @@ install() { local ZIP_PACKAGE=zip local SQLITE_COMMAND=sqlite3 local SQLITE_PACKAGE="$SQLITE_COMMAND libsqlite3-dev" + local ANSIBLE_COMMAND=ansible + local ANSIBLE_PACKAGE="$ANSIBLE_COMMAND" # Load base bash library source $BIN_PATH/$LIBRARY/base.lib @@ -124,6 +126,13 @@ install() { then sops_install fi + + # Install ansible from OS Packages + command_installed $ANSIBLE_COMMAND + if [ $? -ne 0 ] + then + os_pkgs_install $ANSIBLE_PACKAGE + fi # Check for container management installed and install podman container_mode @@ -149,9 +158,9 @@ sudo bash -c "$(declare -f load_bootstrap_msg; declare -f install); install $BIN result=$? # Run install ansible with regular user -if [ $result -eq 0 ] -then +#if [ $result -eq 0 ] +#then # Load bootstrap bash library - source $BIN_HOME/$BIN_LIBS/bootstrap.lib - ansible_install -fi +# source $BIN_HOME/$BIN_LIBS/bootstrap.lib +# ansible_install +#fi diff --git a/bin/vpn_users.sh b/bin/vpn_users.sh index b0f636d..b8ed998 100755 --- a/bin/vpn_users.sh +++ b/bin/vpn_users.sh @@ -101,7 +101,7 @@ function vpn_pritunl_users_form() { dialog_form if [ $? -eq 0 ] then - display_text_header ${BIN_HOME} "${plmsg_000} ${plmsg_101}" + display_devstools_header "${plmsg_000}" if [ "${action}" != "remove" ] then ansible-playbook -i ${BIN_HOME}/inventory/base.ini ${BIN_HOME}/bin/ansible/pritunl_users.yaml \ @@ -120,7 +120,7 @@ function vpn_pritunl_users_form() { # Check if dialog is not installed, exited! if ! command -v dialog >/dev/null 2>&1 then - display_text_header ${BIN_HOME} "${plmsg_000} ${plmsg_101}" + display_devstools_header "${plmsg_000}" echo "${head_001}" exit 200 fi @@ -128,7 +128,7 @@ fi # Check if ansible-playbook is not installed, exited! if ! command -v ansible-playbook >/dev/null 2>&1 then - display_text_header ${BIN_HOME} "${plmsg_000} ${plmsg_101}" + display_devstools_header "${plmsg_000}" echo "${plmsg_002}" exit 210 fi