From: Alfredo Deza Date: Wed, 1 Oct 2014 15:22:48 +0000 (-0400) Subject: allow to pass detect_sudo to get() X-Git-Tag: v1.5.17~4^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=145782bbaddb208e94521b72fe6cf775a8171b35;p=ceph-deploy.git allow to pass detect_sudo to get() Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/hosts/__init__.py b/ceph_deploy/hosts/__init__.py index 7c2061f..60d6c02 100644 --- a/ceph_deploy/hosts/__init__.py +++ b/ceph_deploy/hosts/__init__.py @@ -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)