Update constants.py to pull module path and the hosts file from the

environment (ANSIBLE_{LIBRARY,HOSTS}) if defined.

Update manpages to represent this.

Also update the env-setup script to set ANSIBLE_{LIBRARY,HOSTS}.
This commit is contained in:
Tim Bielawa 2012-03-05 16:06:02 -05:00
commit f2c2786a14
5 changed files with 51 additions and 14 deletions

View file

@ -16,9 +16,14 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
import os
# control side (aka 'overlord')
DEFAULT_HOST_LIST = '/etc/ansible/hosts'
DEFAULT_MODULE_PATH = '/usr/share/ansible'
DEFAULT_HOST_LIST = os.environ.get('ANSIBLE_HOSTS',
'/etc/ansible/hosts')
DEFAULT_MODULE_PATH = os.environ.get('ANSIBLE_LIBRARY',
'/usr/share/ansible')
DEFAULT_MODULE_NAME = 'command'
DEFAULT_PATTERN = '*'
DEFAULT_FORKS = 5
@ -26,4 +31,3 @@ DEFAULT_MODULE_ARGS = ''
DEFAULT_TIMEOUT = 10
DEFAULT_REMOTE_USER = 'root'
DEFAULT_REMOTE_PASS = None