summaryrefslogtreecommitdiff
path: root/bin/ansible-pull
diff options
context:
space:
mode:
authorMichael DeHaan <michael.dehaan@gmail.com>2012-05-01 23:22:23 -0400
committerMichael DeHaan <michael.dehaan@gmail.com>2012-05-01 23:22:23 -0400
commita33320d03dee06a3e6cb5b97e89f561753dc6dab (patch)
tree9eccd3b028c5346efb2e4bc2cc7b022345a8577a /bin/ansible-pull
parente54eeb76299a9594c64a5d0ff084016807a471c7 (diff)
downloadansible-a33320d03dee06a3e6cb5b97e89f561753dc6dab.tar.gz
Add some comments to ansible-pull and the example playbook
Diffstat (limited to 'bin/ansible-pull')
-rwxr-xr-xbin/ansible-pull11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/ansible-pull b/bin/ansible-pull
index b75c4631e4..219bc725f0 100755
--- a/bin/ansible-pull
+++ b/bin/ansible-pull
@@ -1,5 +1,15 @@
#!/usr/bin/env python
+# ansible-pull is a script that runs ansible in local mode
+# after checking out a playbooks directory from git. There is an
+# example playbook to bootstrap this script in the examples/ dir which
+# installs ansible and sets it up to run on cron.
+#
+# usage:
+# ansible-pull -d /var/ansible/local -U http://wherever/content.git -C production
+#
+# the git repo must contain a playbook named 'local.yml'
+
# (c) 2012, Stephen Fromm <sfromm@gmail.com>
#
# Ansible is free software: you can redistribute it and/or modify
@@ -47,6 +57,7 @@ def main(args):
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
rc = _run(cmd)
if rc != 0:
return rc