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
5c2bad90
Commit
5c2bad90
authored
Aug 18, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor OSX callback fixups
parent
1605fc1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
callbacks/osx_say.py
+9
-5
No files found.
callbacks/osx_say.py
View file @
5c2bad90
...
...
@@ -21,6 +21,7 @@ import subprocess
FAILED_VOICE
=
"Zarvox"
REGULAR_VOICE
=
"Trinoids"
HAPPY_VOICE
=
"Cellos"
LASER_VOICE
=
"Princess"
def
say
(
msg
,
voice
):
subprocess
.
call
([
"/usr/bin/say"
,
msg
,
"--voice=
%
s"
%
(
voice
)])
...
...
@@ -42,13 +43,13 @@ class CallbackModule(object):
say
(
"Failure on host
%
s"
%
host
,
FAILED_VOICE
)
def
runner_on_ok
(
self
,
host
,
res
):
say
(
"pew"
,
"Princess"
)
say
(
"pew"
,
LASER_VOICE
)
def
runner_on_error
(
self
,
host
,
msg
):
pass
def
runner_on_skipped
(
self
,
host
,
item
=
None
):
say
(
"pew"
,
"Princess"
)
say
(
"pew"
,
LASER_VOICE
)
def
runner_on_unreachable
(
self
,
host
,
res
):
say
(
"Failure on host
%
s"
%
host
,
FAILED_VOICE
)
...
...
@@ -60,7 +61,7 @@ class CallbackModule(object):
pass
def
runner_on_async_ok
(
self
,
host
,
res
,
jid
):
say
(
"pew"
,
"Princess"
)
say
(
"pew"
,
LASER_VOICE
)
def
runner_on_async_failed
(
self
,
host
,
res
,
jid
):
say
(
"Failure on host
%
s"
%
host
,
FAILED_VOICE
)
...
...
@@ -69,10 +70,13 @@ class CallbackModule(object):
say
(
"Running Playbook"
,
REGULAR_VOICE
)
def
playbook_on_notify
(
self
,
host
,
handler
):
say
(
"pew"
,
"Princess"
)
say
(
"pew"
,
LASER_VOICE
)
def
playbook_on_task_start
(
self
,
name
,
is_conditional
):
say
(
"Starting task:
%
s"
%
name
,
REGULAR_VOICE
)
if
not
is_conditional
:
say
(
"Starting task:
%
s"
%
name
,
REGULAR_VOICE
)
else
:
say
(
"Notifying task:
%
s"
%
name
,
REGULAR_VOICE
)
def
playbook_on_vars_prompt
(
self
,
varname
,
private
=
True
,
prompt
=
None
,
encrypt
=
None
,
confirm
=
False
,
salt_size
=
None
,
salt
=
None
):
pass
...
...
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