From 34a9f6711529952ff762ef2582c61fee74821d4a Mon Sep 17 00:00:00 2001 From: David Wilson Date: Fri, 10 Aug 2018 14:21:10 +0100 Subject: [PATCH] issue #339: whoops, actually wire up new connection method. --- ansible_mitogen/connection.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ansible_mitogen/connection.py b/ansible_mitogen/connection.py index c45a8aa7..c0a17c17 100644 --- a/ansible_mitogen/connection.py +++ b/ansible_mitogen/connection.py @@ -126,6 +126,17 @@ def _connect_lxc(spec): } +def _connect_lxd(spec): + return { + 'method': 'lxd', + 'kwargs': { + 'container': spec['remote_addr'], + 'python_path': spec['python_path'], + 'connect_timeout': spec['ansible_ssh_timeout'] or spec['timeout'], + } + } + + def _connect_machinectl(spec): return _connect_setns(dict(spec, mitogen_kind='machinectl')) @@ -236,7 +247,7 @@ CONNECTION_METHOD = { 'jail': _connect_jail, 'local': _connect_local, 'lxc': _connect_lxc, - 'lxd': _connect_lxc, + 'lxd': _connect_lxd, 'machinectl': _connect_machinectl, 'setns': _connect_setns, 'ssh': _connect_ssh,