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
f39944b8
Commit
f39944b8
authored
Mar 15, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update example to use correct service state; minor pep8 indent/spacing fixes
parent
24923c2e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
examples/playbooks/playbook.yml
+1
-1
lib/ansible/errors.py
+1
-1
lib/ansible/playbook.py
+10
-10
No files found.
examples/playbooks/playbook.yml
View file @
f39944b8
...
...
@@ -54,7 +54,7 @@
# make sure httpd is running
-
name
:
httpd start
action
:
service name=httpd state=
started
action
:
service name=httpd state=
running
# handlers are only run when things change, at the very end of each
# play. Let's define some. The names are significant and must
...
...
lib/ansible/errors.py
View file @
f39944b8
...
...
@@ -22,7 +22,7 @@ class AnsibleError(Exception):
"""
def
__init__
(
self
,
msg
):
self
.
msg
=
msg
self
.
msg
=
msg
def
__str__
(
self
):
return
self
.
msg
...
...
lib/ansible/playbook.py
View file @
f39944b8
...
...
@@ -141,19 +141,19 @@ class PlayBook(object):
# process tasks in this file as well as imported tasks
new_tasks
=
[]
for
task
in
tasks
:
if
'include'
in
task
:
self
.
_include_tasks
(
play
,
task
,
dirname
,
new_tasks
)
else
:
new_tasks
.
append
(
task
)
if
'include'
in
task
:
self
.
_include_tasks
(
play
,
task
,
dirname
,
new_tasks
)
else
:
new_tasks
.
append
(
task
)
play
[
'tasks'
]
=
new_tasks
# process handlers as well as imported handlers
new_handlers
=
[]
for
handler
in
handlers
:
if
'include'
in
handler
:
self
.
_include_handlers
(
play
,
handler
,
dirname
,
new_handlers
)
else
:
new_handlers
.
append
(
handler
)
if
'include'
in
handler
:
self
.
_include_handlers
(
play
,
handler
,
dirname
,
new_handlers
)
else
:
new_handlers
.
append
(
handler
)
play
[
'handlers'
]
=
new_handlers
return
playbook
...
...
@@ -331,8 +331,8 @@ class PlayBook(object):
# load the module name and parameters from the task entry
name
=
task
[
'name'
]
action
=
task
[
'action'
]
async_seconds
=
int
(
task
.
get
(
'async'
,
0
))
# not async by default
async_poll_interval
=
int
(
task
.
get
(
'poll'
,
10
))
# default poll = 10 seconds
async_seconds
=
int
(
task
.
get
(
'async'
,
0
))
# not async by default
async_poll_interval
=
int
(
task
.
get
(
'poll'
,
10
))
# default poll = 10 seconds
# comment = task.get('comment', '')
...
...
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