From 47d72fb83a2c9b01242566255dfb6e16ac1e0258 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Thu, 14 Sep 2017 09:27:27 +0200 Subject: [PATCH] Create control path only if needed. --- cdist/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cdist/config.py b/cdist/config.py index 06db807a..11da04da 100644 --- a/cdist/config.py +++ b/cdist/config.py @@ -272,7 +272,10 @@ class Config(object): @classmethod def _resolve_remote_cmds(cls, args): - control_path = cls._resolve_ssh_control_path() + if (args.remote_exec_pattern or + args.remote_copy_pattern or + args.remote_cmds_cleanup_pattern): + control_path = cls._resolve_ssh_control_path() # If we constructed patterns for remote commands then there is # placeholder for ssh ControlPath, format it and we have unique # ControlPath for each host.