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
4ae3bee4
Commit
4ae3bee4
authored
Nov 11, 2012
by
Stephen Fromm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add --limit to calls to ansible and ansible-playbook
--limit takes localhost, FQDN, and 127.0.0.1.
parent
40e49b6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
bin/ansible-pull
+3
-2
No files found.
bin/ansible-pull
View file @
4ae3bee4
...
...
@@ -115,8 +115,9 @@ def main(args):
now
=
datetime
.
datetime
.
now
()
print
>>
sys
.
stderr
,
now
.
strftime
(
"Starting ansible-pull at
%
F
%
T"
)
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 -
m git -a "
%
s"'
%
git_opts
cmd
=
'ansible all -c local -
-limit "
%
s" -m git -a "
%
s"'
%
(
limit_opts
,
git_opts
)
rc
=
_run
(
cmd
)
if
rc
!=
0
:
return
rc
...
...
@@ -127,7 +128,7 @@ def main(args):
print
>>
sys
.
stderr
,
"Could not find a playbook to run."
return
1
cmd
=
'ansible-playbook -c local
%
s'
%
playbook
cmd
=
'ansible-playbook -c local
--limit "
%
s"
%
s'
%
(
limit_opts
,
playbook
)
os
.
chdir
(
options
.
dest
)
rc
=
_run
(
cmd
)
...
...
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