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
a4b8cdf8
Commit
a4b8cdf8
authored
Mar 18, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove "import *"'s from bin/ansible-playbook code so pyflakes will be usable.
parent
9e07b242
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
bin/ansible-playbook
+9
-8
No files found.
bin/ansible-playbook
View file @
a4b8cdf8
...
@@ -19,13 +19,14 @@
...
@@ -19,13 +19,14 @@
#######################################################
#######################################################
import
sys
import
sys
import
ansible.playbook
import
ansible.constants
as
C
from
ansible.utils
import
*
from
ansible.errors
import
*
import
getpass
import
getpass
from
optparse
import
OptionParser
from
optparse
import
OptionParser
import
ansible.playbook
import
ansible.constants
as
C
from
ansible
import
errors
from
ansible
import
utils
#######################################################
#######################################################
class
PlaybookCallbacks
(
object
):
class
PlaybookCallbacks
(
object
):
...
@@ -40,13 +41,13 @@ class PlaybookCallbacks(object):
...
@@ -40,13 +41,13 @@ class PlaybookCallbacks(object):
print
"
\n
"
print
"
\n
"
def
on_task_start
(
self
,
name
,
is_conditional
):
def
on_task_start
(
self
,
name
,
is_conditional
):
print
task_start_msg
(
name
,
is_conditional
)
print
utils
.
task_start_msg
(
name
,
is_conditional
)
def
on_unreachable
(
self
,
host
,
msg
):
def
on_unreachable
(
self
,
host
,
msg
):
print
"unreachable: [
%
s] =>
%
s"
%
(
host
,
msg
)
print
"unreachable: [
%
s] =>
%
s"
%
(
host
,
msg
)
def
on_failed
(
self
,
host
,
results
):
def
on_failed
(
self
,
host
,
results
):
print
"failed: [
%
s] =>
%
s
\n
"
%
(
host
,
smjson
(
results
))
print
"failed: [
%
s] =>
%
s
\n
"
%
(
host
,
utils
.
smjson
(
results
))
def
on_ok
(
self
,
host
):
def
on_ok
(
self
,
host
):
print
"ok: [
%
s]
\n
"
%
(
host
)
print
"ok: [
%
s]
\n
"
%
(
host
)
...
@@ -58,7 +59,7 @@ class PlaybookCallbacks(object):
...
@@ -58,7 +59,7 @@ class PlaybookCallbacks(object):
print
msg
print
msg
def
on_async_poll
(
self
,
jid
,
host
,
clock
,
host_result
):
def
on_async_poll
(
self
,
jid
,
host
,
clock
,
host_result
):
print
async_poll_status
(
jid
,
host
,
clock
,
host_result
)
print
utils
.
async_poll_status
(
jid
,
host
,
clock
,
host_result
)
def
on_dark_host
(
self
,
host
,
msg
):
def
on_dark_host
(
self
,
host
,
msg
):
print
"exception: [
%
s] =>
%
s"
%
(
host
,
msg
)
print
"exception: [
%
s] =>
%
s"
%
(
host
,
msg
)
...
@@ -105,7 +106,7 @@ def main(args):
...
@@ -105,7 +106,7 @@ def main(args):
)
)
try
:
try
:
pb
.
run
()
pb
.
run
()
except
AnsibleError
as
e
:
except
errors
.
AnsibleError
as
e
:
print
>>
sys
.
stderr
,
"ERROR:
%
s"
%
e
print
>>
sys
.
stderr
,
"ERROR:
%
s"
%
e
return
1
return
1
...
...
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