Use {{ ansible_host }} for ssh-keyscan

This is a noop change, which removes the hardcoded node IP address
from our playbook. This is a step forward to allow users to re-run our
playbooks in an effort to reproduce produce problems locally.

Change-Id: I3d3b979fb9bfffce1ea1466403a277e6f6e146cc
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-08-08 18:53:45 -04:00
parent 84c4f94000
commit 6662f85042
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
1 changed files with 2 additions and 2 deletions

View File

@ -1177,8 +1177,8 @@ class NodeWorker(object):
error_block = []
variables = []
shellargs = "ssh-keyscan %s > %s" % (
self.host, jobdir.known_hosts)
shellargs = "ssh-keyscan {{ ansible_host }} > %s" % (
jobdir.known_hosts)
pre_tasks.append(dict(shell=shellargs,
delegate_to='127.0.0.1'))