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
24b7c353
Commit
24b7c353
authored
Jun 09, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readjusted limit opts, makes no sense in adhoc when you already specify selection
changed pull to reflect this
parent
845d564d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
lib/ansible/cli/__init__.py
+2
-2
lib/ansible/cli/adhoc.py
+1
-0
lib/ansible/cli/pull.py
+2
-2
No files found.
lib/ansible/cli/__init__.py
View file @
24b7c353
...
...
@@ -222,12 +222,12 @@ class CLI(object):
help
=
"specify path(s) to module library (default=
%
s)"
%
C
.
DEFAULT_MODULE_PATH
,
default
=
None
)
parser
.
add_option
(
'-e'
,
'--extra-vars'
,
dest
=
"extra_vars"
,
action
=
"append"
,
help
=
"set additional variables as key=value or YAML/JSON"
,
default
=
[])
parser
.
add_option
(
'-l'
,
'--limit'
,
default
=
C
.
DEFAULT_SUBSET
,
dest
=
'subset'
,
help
=
'further limit selected hosts to an additional pattern'
)
if
fork_opts
:
parser
.
add_option
(
'-f'
,
'--forks'
,
dest
=
'forks'
,
default
=
C
.
DEFAULT_FORKS
,
type
=
'int'
,
help
=
"specify number of parallel processes to use (default=
%
s)"
%
C
.
DEFAULT_FORKS
)
parser
.
add_option
(
'-l'
,
'--limit'
,
default
=
C
.
DEFAULT_SUBSET
,
dest
=
'subset'
,
help
=
'further limit selected hosts to an additional pattern'
)
if
vault_opts
:
parser
.
add_option
(
'--ask-vault-pass'
,
default
=
False
,
dest
=
'ask_vault_pass'
,
action
=
'store_true'
,
...
...
lib/ansible/cli/adhoc.py
View file @
24b7c353
...
...
@@ -45,6 +45,7 @@ class AdHocCLI(CLI):
check_opts
=
True
,
runtask_opts
=
True
,
vault_opts
=
True
,
fork_opts
=
True
,
)
# options unique to ansible ad-hoc
...
...
lib/ansible/cli/pull.py
View file @
24b7c353
...
...
@@ -104,7 +104,7 @@ class PullCLI(CLI):
# Build Checkout command
# Now construct the ansible command
limit_opts
=
'localhost:
%
s:127.0.0.1'
%
socket
.
getfqdn
()
base_opts
=
'-c local
--limit
"
%
s"'
%
limit_opts
base_opts
=
'-c local "
%
s"'
%
limit_opts
if
self
.
options
.
verbosity
>
0
:
base_opts
+=
' -
%
s'
%
''
.
join
([
"v"
for
x
in
range
(
0
,
self
.
options
.
verbosity
)
])
...
...
@@ -132,7 +132,7 @@ class PullCLI(CLI):
raise
AnsibleOptionsError
((
"module '
%
s' not found.
\n
"
%
self
.
options
.
module_name
))
bin_path
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
sys
.
argv
[
0
]))
cmd
=
'
%
s/ansible
localhost
-i "
%
s"
%
s -m
%
s -a "
%
s"'
%
(
cmd
=
'
%
s/ansible -i "
%
s"
%
s -m
%
s -a "
%
s"'
%
(
bin_path
,
inv_opts
,
base_opts
,
self
.
options
.
module_name
,
repo_opts
)
...
...
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