#!/bin/bash

set -e

DIR=$(dirname $0)

cd $DIR
echo "$(date +%F-%T) Starting: $@" >> /tmp/hosts-log.txt
exec ./hosts.py "$@" < hosts.yml

#!/bin/bash

set -e

DIR=$(dirname $0)

exec $DIR/hosts.py "$@" < ${ANSIBLE_HOSTS_YML:-$DIR/hosts.yml}

Allow the use of ANSIBLE_HOSTS_YML to specify a different inventory
Allow the use of ANSIBLE_HOSTS_YML to specify a different inventory
