]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Use Remote.hostname
authorZack Cerza <zack@redhat.com>
Fri, 22 May 2015 16:34:35 +0000 (10:34 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 1 Jun 2015 16:21:09 +0000 (10:21 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/task/ansible.py

index 70138f965ed7c1bcdf949665f351312e07399840..fa6b1b953e377272286a8f224214abbca009f790 100644 (file)
@@ -161,7 +161,7 @@ class Ansible(Task):
         we're using an existing file.
         """
         hosts = self.cluster.remotes.keys()
-        hostnames = [remote.name.split('@')[-1] for remote in hosts]
+        hostnames = [remote.hostname for remote in hosts]
         hostnames.sort()
         hosts_str = '\n'.join(hostnames + [''])
         hosts_file = NamedTemporaryFile(prefix="teuth_ansible_hosts_",
@@ -223,7 +223,7 @@ class Ansible(Task):
         """
         Assemble the list of args to be executed
         """
-        fqdns = [r.name.split('@')[-1] for r in self.cluster.remotes.keys()]
+        fqdns = [r.hostname for r in self.cluster.remotes.keys()]
         args = [
             'ansible-playbook', '-v',
             '-i', self.inventory,