]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
allow to pass detect_sudo to get()
authorAlfredo Deza <alfredo.deza@inktank.com>
Wed, 1 Oct 2014 15:22:48 +0000 (11:22 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Wed, 1 Oct 2014 15:22:48 +0000 (11:22 -0400)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/hosts/__init__.py

index 7c2061f94627eb5ec5500e3a04b5f919b58ec764..60d6c027b5e7c3bdd9d40a51577157e25768c0f2 100644 (file)
@@ -12,7 +12,7 @@ from ceph_deploy.connection import get_connection
 logger = logging.getLogger()
 
 
-def get(hostname, username=None, fallback=None):
+def get(hostname, username=None, fallback=None, detect_sudo=True):
     """
     Retrieve the module that matches the distribution of a ``hostname``. This
     function will connect to that host and retrieve the distribution
@@ -32,7 +32,8 @@ def get(hostname, username=None, fallback=None):
     conn = get_connection(
         hostname,
         username=username,
-        logger=logging.getLogger(hostname)
+        logger=logging.getLogger(hostname),
+        detect_sudo=detect_sudo
     )
     try:
         conn.import_module(remotes)