mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
export ANSIBLE_HOME so it can be used in scripts
In order that scripts like this can work ``` #!/bin/bash ansible -vvvv tag_instance_type_foo-training -i "${ANSIBLE_HOME}/plugins/inventory/ec2.py" --private-key=~/Downloads/foo-training.pem -u ec2-user -m ping ```
This commit is contained in:
parent
cb53b0f94a
commit
e5f651c458
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ fi
|
|||
# The below is an alternative to readlink -fn which doesn't exist on OS X
|
||||
# Source: http://stackoverflow.com/a/1678636
|
||||
FULL_PATH=`python -c "import os; print(os.path.realpath('$HACKING_DIR'))"`
|
||||
ANSIBLE_HOME=`dirname "$FULL_PATH"`
|
||||
export ANSIBLE_HOME=`dirname "$FULL_PATH"`
|
||||
|
||||
PREFIX_PYTHONPATH="$ANSIBLE_HOME/lib"
|
||||
PREFIX_PATH="$ANSIBLE_HOME/bin"
|
||||
|
|
Loading…
Reference in a new issue