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
d1977dad
Commit
d1977dad
authored
May 08, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
started implementing syntax check
parent
f9f8af06
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
lib/ansible/cli/playbook.py
+1
-1
lib/ansible/executor/playbook_executor.py
+8
-1
No files found.
lib/ansible/cli/playbook.py
View file @
d1977dad
...
@@ -87,7 +87,7 @@ class PlaybookCLI(CLI):
...
@@ -87,7 +87,7 @@ class PlaybookCLI(CLI):
passwords
=
{}
passwords
=
{}
# don't deal with privilege escalation or passwords when we don't need to
# don't deal with privilege escalation or passwords when we don't need to
if
not
self
.
options
.
listhosts
and
not
self
.
options
.
listtasks
and
not
self
.
options
.
listtags
:
if
not
self
.
options
.
listhosts
and
not
self
.
options
.
listtasks
and
not
self
.
options
.
listtags
and
not
self
.
options
.
syntax
:
self
.
normalize_become_options
()
self
.
normalize_become_options
()
(
sshpass
,
becomepass
)
=
self
.
ask_passwords
()
(
sshpass
,
becomepass
)
=
self
.
ask_passwords
()
passwords
=
{
'conn_pass'
:
sshpass
,
'become_pass'
:
becomepass
}
passwords
=
{
'conn_pass'
:
sshpass
,
'become_pass'
:
becomepass
}
...
...
lib/ansible/executor/playbook_executor.py
View file @
d1977dad
...
@@ -46,7 +46,7 @@ class PlaybookExecutor:
...
@@ -46,7 +46,7 @@ class PlaybookExecutor:
self
.
_options
=
options
self
.
_options
=
options
self
.
passwords
=
passwords
self
.
passwords
=
passwords
if
options
.
listhosts
or
options
.
listtasks
or
options
.
listtags
:
if
options
.
listhosts
or
options
.
listtasks
or
options
.
listtags
or
options
.
syntax
:
self
.
_tqm
=
None
self
.
_tqm
=
None
else
:
else
:
self
.
_tqm
=
TaskQueueManager
(
inventory
=
inventory
,
variable_manager
=
variable_manager
,
loader
=
loader
,
display
=
display
,
options
=
options
,
passwords
=
self
.
passwords
)
self
.
_tqm
=
TaskQueueManager
(
inventory
=
inventory
,
variable_manager
=
variable_manager
,
loader
=
loader
,
display
=
display
,
options
=
options
,
passwords
=
self
.
passwords
)
...
@@ -85,6 +85,9 @@ class PlaybookExecutor:
...
@@ -85,6 +85,9 @@ class PlaybookExecutor:
new_play
=
play
.
copy
()
new_play
=
play
.
copy
()
new_play
.
post_validate
(
templar
)
new_play
.
post_validate
(
templar
)
if
self
.
_options
.
syntax
:
continue
if
self
.
_tqm
is
None
:
if
self
.
_tqm
is
None
:
# we are just doing a listing
# we are just doing a listing
...
@@ -147,6 +150,10 @@ class PlaybookExecutor:
...
@@ -147,6 +150,10 @@ class PlaybookExecutor:
if
self
.
_tqm
is
not
None
:
if
self
.
_tqm
is
not
None
:
self
.
_cleanup
()
self
.
_cleanup
()
if
self
.
_options
.
syntax
:
self
.
display
.
display
(
"No issues encountered"
)
return
result
# FIXME: this stat summary stuff should be cleaned up and moved
# FIXME: this stat summary stuff should be cleaned up and moved
# to a new method, if it even belongs here...
# to a new method, if it even belongs here...
self
.
_display
.
banner
(
"PLAY RECAP"
)
self
.
_display
.
banner
(
"PLAY RECAP"
)
...
...
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