From 5ea8ad2d946f061e086a600edf185fa940b7670c Mon Sep 17 00:00:00 2001 From: Timothy Appnel Date: Mon, 11 Jun 2012 12:05:46 -0400 Subject: [PATCH] Most constants can be overriden with environment variables. Reserved doing anything with the connection options for further review. --- lib/ansible/constants.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py index 7906b15cbec..7be595fa922 100644 --- a/lib/ansible/constants.py +++ b/lib/ansible/constants.py @@ -28,16 +28,16 @@ DEFAULT_REMOTE_TMP = os.environ.get('ANSIBLE_REMOTE_TMP', DEFAULT_MODULE_NAME = 'command' DEFAULT_PATTERN = '*' -DEFAULT_FORKS = 5 -DEFAULT_MODULE_ARGS = '' -DEFAULT_TIMEOUT = 10 -DEFAULT_POLL_INTERVAL = 15 -DEFAULT_REMOTE_USER = 'root' +DEFAULT_FORKS = os.environ.get('ANSIBLE_FORKS',5) +DEFAULT_MODULE_ARGS = os.environ.get('ANSIBLE_MODULE_ARGS','') +DEFAULT_TIMEOUT = os.environ.get('ANSIBLE_TIMEOUT',10) +DEFAULT_POLL_INTERVAL = os.environ.get('ANSIBLE_POLL_INTERVAL',15) +DEFAULT_REMOTE_USER = os.environ.get('ANSIBLE_REMOTE_USER','root') DEFAULT_REMOTE_PASS = None -DEFAULT_PRIVATE_KEY_FILE = None +DEFAULT_PRIVATE_KEY_FILE = os.environ.get('ANSIBLE_REMOTE_USER',None) DEFAULT_SUDO_PASS = None -DEFAULT_SUDO_USER = 'root' +DEFAULT_SUDO_USER = os.environ.get('ANSIBLE_SUDO_USER','root') DEFAULT_REMOTE_PORT = 22 -DEFAULT_TRANSPORT = 'paramiko' +DEFAULT_TRANSPORT = os.environ.get('ANSIBLE_TRANSPORT','paramiko') DEFAULT_TRANSPORT_OPTS = ['local', 'paramiko']