Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Schulman committed Feb 24, 2014
1 parent 1a195f9 commit bd4c092
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
19 changes: 18 additions & 1 deletion env-setup
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
export ANSIBLE_LIBRARY=$ANSIBLE_LIBRARY:`pwd`/library
#!/bin/bash
# usage: source env-setup

# When run using source as directed, $0 gets set to bash, so we must use $BASH_SOURCE
if [ -n "$BASH_SOURCE" ] ; then
HACKING_DIR=`dirname $BASH_SOURCE`
elif [ $(basename $0) = "env-setup" ]; then
HACKING_DIR=`dirname $0`
else
HACKING_DIR="$PWD"
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'))"`
PRJ_LIBRARY="$FULL_PATH/library"

[[ $ANSIBLE_LIBRARY != ${PRJ_LIBRARY}* ]] && export ANSIBLE_LIBRARY=$PRJ_LIBRARY:$ANSIBLE_LIBRARY
3 changes: 2 additions & 1 deletion library/junos_install_os
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def main():
dev.open()

results = junos_install_os(module, dev)

results['check_mode'] = module.check_mode

dev.close()
module.exit_json(**results)

Expand Down

0 comments on commit bd4c092

Please sign in to comment.