From d54100edf845734fe794b225753ae3dc69a35ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Mon, 29 Apr 2024 05:06:21 +0300 Subject: [PATCH] Source Update --- src/commands/init.sh | 3 +++ src/functions/stop.sh | 6 +++--- wx | 9 ++++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/commands/init.sh b/src/commands/init.sh index 127f379..88afa02 100644 --- a/src/commands/init.sh +++ b/src/commands/init.sh @@ -11,4 +11,7 @@ wx-init () { apt-get install -y python3-pip python3-venv jq git curl &> /dev/null python3 -m venv /opt/ansible &> /dev/null /opt/ansible/bin/pip3 install ansible hvac netaddr jmespath pexpect &> /dev/null + + /opt/ansible/bin/ansible-pull -U ssh://git@$GIT_DOMAIN:$GIT_PORT/$GIT_REPOSITORY --vault-password-file ~/.ansible/vault.yml --private-key ~/.ssh/init playbooks/init.yml -t init + } diff --git a/src/functions/stop.sh b/src/functions/stop.sh index 187f73d..8f43010 100644 --- a/src/functions/stop.sh +++ b/src/functions/stop.sh @@ -9,9 +9,9 @@ wx-stop () { chmod +x wx &> /dev/null fi - sudo curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o /opt/wx &> /dev/null - sudo ln -sf /opt/wx /usr/bin/wx &> /dev/null - sudo chmod +x /usr/bin/wx &> /dev/null + mkdir $HOME/bin &> /dev/null + curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o $HOME/bin/wx &> /dev/null + chmod +x $HOME/bin/wx &> /dev/null exit 1 } diff --git a/wx b/wx index f95fcac..8b95885 100755 --- a/wx +++ b/wx @@ -232,9 +232,9 @@ wx-stop () { chmod +x wx &> /dev/null fi - sudo curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o /opt/wx &> /dev/null - sudo ln -sf /opt/wx /usr/bin/wx &> /dev/null - sudo chmod +x /usr/bin/wx &> /dev/null + mkdir $HOME/bin &> /dev/null + curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o $HOME/bin/wx &> /dev/null + chmod +x $HOME/bin/wx &> /dev/null exit 1 } @@ -271,6 +271,9 @@ wx-init () { apt-get install -y python3-pip python3-venv jq git curl &> /dev/null python3 -m venv /opt/ansible &> /dev/null /opt/ansible/bin/pip3 install ansible hvac netaddr jmespath pexpect &> /dev/null + + /opt/ansible/bin/ansible-pull -U ssh://git@$GIT_DOMAIN:$GIT_PORT/$GIT_REPOSITORY --vault-password-file ~/.ansible/vault.yml --private-key ~/.ssh/init playbooks/init.yml -t init + } wx-settings() {