Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
f0d7324e
Commit
f0d7324e
authored
Jun 03, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3094 from sfromm/issue2464-redux
Updates to ansible-pull and ansible-pull docs
parents
fc0e4f73
355ab698
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
bin/ansible-pull
+8
-1
docs/man/man1/ansible-pull.1.asciidoc.in
+20
-1
No files found.
bin/ansible-pull
View file @
f0d7324e
...
...
@@ -102,6 +102,8 @@ def main(args):
parser
.
add_option
(
'-C'
,
'--checkout'
,
dest
=
'checkout'
,
default
=
"HEAD"
,
help
=
'Branch/Tag/Commit to checkout. Defaults to HEAD.'
)
parser
.
add_option
(
'-i'
,
'--inventory-file'
,
dest
=
'inventory'
,
help
=
"specify inventory host file"
)
options
,
args
=
parser
.
parse_args
(
args
)
if
not
options
.
dest
:
...
...
@@ -115,9 +117,12 @@ def main(args):
now
=
datetime
.
datetime
.
now
()
print
>>
sys
.
stderr
,
now
.
strftime
(
"Starting ansible-pull at
%
F
%
T"
)
inv_opts
=
'localhost,'
limit_opts
=
'localhost:
%
s:127.0.0.1'
%
socket
.
getfqdn
()
git_opts
=
"repo=
%
s dest=
%
s version=
%
s"
%
(
options
.
url
,
options
.
dest
,
options
.
checkout
)
cmd
=
'ansible all -c local --limit "
%
s" -m git -a "
%
s"'
%
(
limit_opts
,
git_opts
)
cmd
=
'ansible all -c local -i "
%
s" --limit "
%
s" -m git -a "
%
s"'
%
(
inv_opts
,
limit_opts
,
git_opts
)
rc
=
_run
(
cmd
)
if
rc
!=
0
:
return
rc
...
...
@@ -129,6 +134,8 @@ def main(args):
return
1
cmd
=
'ansible-playbook -c local --limit "
%
s"
%
s'
%
(
limit_opts
,
playbook
)
if
options
.
inventory
:
cmd
+=
' -i "
%
s"'
%
options
.
inventory
os
.
chdir
(
options
.
dest
)
rc
=
_run
(
cmd
)
...
...
docs/man/man1/ansible-pull.1.asciidoc.in
View file @
f0d7324e
...
...
@@ -12,7 +12,7 @@ ansible-pull - set up a remote copy of ansible on each managed node
SYNOPSIS
--------
ansible -d DEST -U URL [ -C CHECKOUT ]
ansible -d DEST -U URL [ -C CHECKOUT ]
[ -i INVENTORY ] [ <filename.yml> ]
DESCRIPTION
...
...
@@ -35,6 +35,17 @@ ansible-pull runs would be an excellent way to gather and analyze
remote logs from ansible-pull.
OPTIONAL ARGUMENT
-----------------
*filename.yml*::
The name of one the YAML format files to run as an ansible playbook. This can
be a relative path within the git checkout. If not provided, ansible-pull
will look for a playbook based on the host's fully-qualified domain name and
finally a playbook named *local.yml*.
OPTIONS
-------
...
...
@@ -50,6 +61,14 @@ URL of git repository to clone.
Branch/Tag/Commit to checkout. Defaults to 'HEAD'.
*-i* 'PATH', *--inventory=*'PATH'::
The 'PATH' to the inventory hosts file. This can be a relative path within
the git checkout.
*--purge*::
Purge the git checkout after the playbook is run.
AUTHOR
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment