From 6fc4274c6851d26c735c3bdd3f345899e11027bd Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 16 Mar 2018 16:56:45 -0400 Subject: [PATCH] Just set ANSIBLE_SSH_CONTROL_PATH_DIR, and don't worry about the socket file name. Ansible itself (since 2.3) has code to have a shorter hashed control path socket name. --- awx/main/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index fc73e4eb41..14001296aa 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -1173,7 +1173,7 @@ class RunJob(BaseTask): cp_dir = os.path.join(kwargs['private_data_dir'], 'cp') if not os.path.exists(cp_dir): os.mkdir(cp_dir, 0o700) - env['ANSIBLE_SSH_CONTROL_PATH'] = os.path.join(cp_dir, '%%h%%p%%r') + env['ANSIBLE_SSH_CONTROL_PATH_DIR'] = cp_dir # Allow the inventory script to include host variables inline via ['_meta']['hostvars']. env['INVENTORY_HOSTVARS'] = str(True)