summaryrefslogtreecommitdiff
path: root/bin/ansible-pull
diff options
context:
space:
mode:
authorWill Thames <will@thames.id.au>2014-08-20 14:19:11 +1000
committerWill Thames <will@thames.id.au>2014-08-20 14:28:53 +1000
commit92f9b74a68f51e31517f832e319902496b12eabd (patch)
tree8c8b1c09dcf0fbb64c5c40f4152baf3f197fa7d9 /bin/ansible-pull
parente6be6192573be8959024f6500431facf37b0338d (diff)
downloadansible-92f9b74a68f51e31517f832e319902496b12eabd.tar.gz
Restrict ansible-pull to only do scm checkout once
This addresses a bug in ansible-pull where running ansible-pull with an existing inventory causes the ansible job that does the SCM checkout to run twice - once for localhost and once for the fully qualified hostname. This can cause a race condition, and usually results in one of the ansible checkouts failing because one of the scm checkouts has its references updated underneath it. Although the SCM checkout actually succeeds, ansible fails with non-zero exit status, and so ansible-pull does not continue. Now that localhost is implicit for ansible runs, the ansible scm checkout can be done using just localhost as a target.
Diffstat (limited to 'bin/ansible-pull')
-rwxr-xr-xbin/ansible-pull2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ansible-pull b/bin/ansible-pull
index 8c624f4ef2..7e3de3aeb8 100755
--- a/bin/ansible-pull
+++ b/bin/ansible-pull
@@ -169,7 +169,7 @@ def main(args):
if path is None:
sys.stderr.write("module '%s' not found.\n" % options.module_name)
return 1
- cmd = 'ansible all -i "%s" %s -m %s -a "%s"' % (
+ cmd = 'ansible localhost -i "%s" %s -m %s -a "%s"' % (
inv_opts, base_opts, options.module_name, repo_opts
)