From b90ffa413fe27a1585fcd906fe4bdf66c9fb0254 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 22 May 2015 10:38:27 -0600 Subject: [PATCH] Explicitly set ansible_ssh_user ... to the same as the teuthology user Signed-off-by: Zack Cerza --- teuthology/task/ansible.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/teuthology/task/ansible.py b/teuthology/task/ansible.py index fa6b1b953..43a564aad 100644 --- a/teuthology/task/ansible.py +++ b/teuthology/task/ansible.py @@ -1,3 +1,4 @@ +import json import logging import requests import os @@ -224,8 +225,12 @@ class Ansible(Task): Assemble the list of args to be executed """ fqdns = [r.hostname for r in self.cluster.remotes.keys()] + # Assume all remotes use the same username + user = self.cluster.remotes.keys()[0].user + extra_vars = dict(ansible_ssh_user=user) args = [ 'ansible-playbook', '-v', + "--extra-vars='%s'" % json.dumps(extra_vars), '-i', self.inventory, '--limit', ','.join(fqdns), self.playbook_file.name, -- 2.47.3