skylab
/
skylab-ansible
Archived
2
0
Fork 0

Add ansible project support to gg function

This commit is contained in:
Ethan Paul 2022-05-20 17:04:50 -04:00
parent 58dcf4694f
commit f3008294e4
Signed by: enpaul
GPG Key ID: 9B6D99E4CFA31867
1 changed files with 3 additions and 1 deletions

View File

@ -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
}