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
f160502b
Commit
f160502b
authored
Oct 15, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1337 from skvidal/devel
trivial --syntax-check option to ansible to just do the yaml validation
parents
7da94e03
41195d0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
bin/ansible-playbook
+7
-0
No files found.
bin/ansible-playbook
View file @
f160502b
...
@@ -59,6 +59,8 @@ def main(args):
...
@@ -59,6 +59,8 @@ def main(args):
help
=
"only run plays and tasks tagged with these values"
)
help
=
"only run plays and tasks tagged with these values"
)
parser
.
add_option
(
'--list-hosts'
,
dest
=
'listhosts'
,
action
=
'store_true'
,
parser
.
add_option
(
'--list-hosts'
,
dest
=
'listhosts'
,
action
=
'store_true'
,
help
=
"dump out a list of hosts, each play will run against, does not run playbook!"
)
help
=
"dump out a list of hosts, each play will run against, does not run playbook!"
)
parser
.
add_option
(
'--syntax-check'
,
dest
=
'syntax'
,
action
=
'store_true'
,
help
=
"do a playbook syntax check on the playbook, do not execute the playbook"
)
options
,
args
=
parser
.
parse_args
(
args
)
options
,
args
=
parser
.
parse_args
(
args
)
...
@@ -121,6 +123,11 @@ def main(args):
...
@@ -121,6 +123,11 @@ def main(args):
print
'
%
s'
%
host
print
'
%
s'
%
host
print
'
\n
'
print
'
\n
'
return
0
return
0
if
options
.
syntax
:
# if we've not exited by now then we are fine.
print
'Playbook Syntax is fine'
return
0
try
:
try
:
...
...
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