summaryrefslogtreecommitdiffstats
path: root/bin/ansible-pull
diff options
context:
space:
mode:
authorMatthew Johnson <mjjohnson33@gmail.com>2012-09-13 02:07:02 +0200
committerStephen Fromm <sfromm@gmail.com>2012-10-12 16:55:22 +0200
commit2b24131baad53123513779c92f1e238273bcd955 (patch)
treee79c39a0f1f544ce6bb0c09dad25bf1876f7ba50 /bin/ansible-pull
parentMerge commits from copperlight's branch ansible-pull_playbook_parameter branch (diff)
downloadansible-2b24131baad53123513779c92f1e238273bcd955.tar.xz
ansible-2b24131baad53123513779c92f1e238273bcd955.zip
fetch the git repo before trying to find a playbook
Diffstat (limited to 'bin/ansible-pull')
-rwxr-xr-xbin/ansible-pull15
1 files changed, 7 insertions, 8 deletions
diff --git a/bin/ansible-pull b/bin/ansible-pull
index 6268bf0d02..284139f043 100755
--- a/bin/ansible-pull
+++ b/bin/ansible-pull
@@ -78,6 +78,13 @@ def main(args):
now = datetime.datetime.now()
print now.strftime("ansible-pull_started: %Y%m%d-%H%M-%S"), "\n"
+ git_opts = "repo=%s dest=%s version=%s" % (options.url, options.dest, options.checkout)
+ cmd = 'ansible all -c local -m git -a "%s"' % git_opts
+ print "cmd=%s" % cmd, "\n"
+ rc = _run(cmd)
+ if rc != 0:
+ return rc
+
hostname = "%s.yml" % platform.node()
if not args:
@@ -117,14 +124,6 @@ def main(args):
print
- git_opts = "repo=%s dest=%s version=%s" % (options.url, options.dest, options.checkout)
- cmd = 'ansible all -c local -m git -a "%s"' % git_opts
- print "cmd=%s" % cmd, "\n"
- rc = _run(cmd)
- if rc != 0:
- return rc
-
-
cmd = 'ansible-playbook -c local %s' % playbook
print "cmd=%s" % cmd
os.chdir(options.dest)