From f3008294e4c7efc1fbfd521b3f13a99a3f87f929 Mon Sep 17 00:00:00 2001 From: Ethan Paul Date: Fri, 20 May 2022 17:04:50 -0400 Subject: [PATCH] Add ansible project support to gg function --- skylab/core/roles/workstation/files/bashrc.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/skylab/core/roles/workstation/files/bashrc.sh b/skylab/core/roles/workstation/files/bashrc.sh index 1282866..7b3be0a 100644 --- a/skylab/core/roles/workstation/files/bashrc.sh +++ b/skylab/core/roles/workstation/files/bashrc.sh @@ -10,7 +10,9 @@ export PROJECTS_DIR="$HOME/Documents/projects" function gg() { cd "$PROJECTS_DIR/$1"; - if [ -f "$PROJECTS_DIR/$1/pyproject.toml" ]; then + if [ -f "$PROJECTS_DIR/$1/ansible.cfg" ]; then + ANSIBLE_CONFIG="$PROJECTS_DIR/$1/ansible.cfg" ANSIBLE_COLLECTIONS_DIR="$PROJECTS_DIR/$1/.ansible" poetry shell; + elif [ -f "$PROJECTS_DIR/$1/pyproject.toml" ]; then poetry shell; fi }