layout_python3

export PROJECT_DIR="${PWD}"

export ANSIBLE_LIBRARY="${PROJECT_DIR}/plugins/modules:${ANSIBLE_LIBRARY}"
export ANSIBLE_STRATEGY_PLUGINS="${PWD}/$(find .direnv/ -type d | grep mitogen | grep plugins | grep strategy | grep -v pycache)"
export ANSIBLE_STRATEGY="mitogen_linear"
export ANSIBLE_INVENTORY="${PWD}/inventory"

export PATH="${PATH}:${PWD}/playbooks"

if [ -e "${PROJECT_DIR}/ssh.cfg" ]; then
    export ANSIBLE_SSH_ARGS="-F ${PROJECT_DIR}/ssh.cfg"
fi

if [ -e "${PROJECT_DIR}/.env.aws" ]; then
    source ${PROJECT_DIR}/.env.aws
fi

if [ -e "${PROJECT_DIR}/.env.scw" ]; then
    source ${PROJECT_DIR}/.env.scw
fi

if [ -e "${PROJECT_DIR}/.env.gandi" ]; then
    source ${PROJECT_DIR}/.env.gandi
fi

if [ -e "${PROJECT_DIR}/.env.galaxy" ]; then
    source ${PROJECT_DIR}/.env.galaxy
fi