summaryrefslogtreecommitdiff
path: root/lib/ansible/__init__.py
diff options
context:
space:
mode:
authorMichael DeHaan <michael.dehaan@gmail.com>2012-02-23 23:26:16 -0500
committerMichael DeHaan <michael.dehaan@gmail.com>2012-02-23 23:26:16 -0500
commit6eda2cf383040271e191b883599043eddd1d6cc3 (patch)
tree59f3264aacaf062959f2c9cc1fae606816c7a75b /lib/ansible/__init__.py
parentbe9fdc8ef12e7a4c4db32fa7889fe0fe93d17f8d (diff)
downloadansible-6eda2cf383040271e191b883599043eddd1d6cc3.tar.gz
Added initial stub for where playbooks will go, moved to common
constants file so as to not repeat constants between CLI and lib.
Diffstat (limited to 'lib/ansible/__init__.py')
-rwxr-xr-xlib/ansible/__init__.py28
1 files changed, 10 insertions, 18 deletions
diff --git a/lib/ansible/__init__.py b/lib/ansible/__init__.py
index f58797061c..2517e51455 100755
--- a/lib/ansible/__init__.py
+++ b/lib/ansible/__init__.py
@@ -28,15 +28,7 @@ import traceback
# non-core
import paramiko
-DEFAULT_HOST_LIST = '/etc/ansible/hosts'
-DEFAULT_MODULE_PATH = '/usr/share/ansible'
-DEFAULT_MODULE_NAME = 'ping'
-DEFAULT_PATTERN = '*'
-DEFAULT_FORKS = 3
-DEFAULT_MODULE_ARGS = ''
-DEFAULT_TIMEOUT = 60
-DEFAULT_REMOTE_USER = 'root'
-DEFAULT_REMOTE_PASS = None
+import constants as C
def _executor_hook(x):
''' callback used by multiprocessing pool '''
@@ -46,15 +38,15 @@ def _executor_hook(x):
class Runner(object):
def __init__(self,
- host_list=DEFAULT_HOST_LIST,
- module_path=DEFAULT_MODULE_PATH,
- module_name=DEFAULT_MODULE_NAME,
- module_args=DEFAULT_MODULE_ARGS,
- forks=DEFAULT_FORKS,
- timeout=DEFAULT_TIMEOUT,
- pattern=DEFAULT_PATTERN,
- remote_user=DEFAULT_REMOTE_USER,
- remote_pass=DEFAULT_REMOTE_PASS,
+ host_list=C.DEFAULT_HOST_LIST,
+ module_path=C.DEFAULT_MODULE_PATH,
+ module_name=C.DEFAULT_MODULE_NAME,
+ module_args=C.DEFAULT_MODULE_ARGS,
+ forks=C.DEFAULT_FORKS,
+ timeout=C.DEFAULT_TIMEOUT,
+ pattern=C.DEFAULT_PATTERN,
+ remote_user=C.DEFAULT_REMOTE_USER,
+ remote_pass=C.DEFAULT_REMOTE_PASS,
verbose=False):