From 9f29e39deaaf4a674d6730502210fbaf6c057c60 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 12 Aug 2015 10:24:34 -0400 Subject: [PATCH] give more matching options for ansible-pull --- lib/ansible/cli/pull.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/cli/pull.py b/lib/ansible/cli/pull.py index 620ec68e97..0555d1a96a 100644 --- a/lib/ansible/cli/pull.py +++ b/lib/ansible/cli/pull.py @@ -18,6 +18,7 @@ ######################################################## import datetime import os +import platform import random import shutil import socket @@ -107,7 +108,9 @@ class PullCLI(CLI): # Build Checkout command # Now construct the ansible command - limit_opts = 'localhost:%s:127.0.0.1' % socket.getfqdn() + node = platform.node() + host = socket.getfqdn() + limit_opts = 'localhost:%s:127.0.0.1' % ':'.join(set([host, node, host.split('.')[0], node.split('.')[0]])) base_opts = '-c local "%s"' % limit_opts if self.options.verbosity > 0: base_opts += ' -%s' % ''.join([ "v" for x in range(0, self.options.verbosity) ])