Commit f39944b8 by Michael DeHaan

Update example to use correct service state; minor pep8 indent/spacing fixes

parent 24923c2e
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
# make sure httpd is running # make sure httpd is running
- name: httpd start - 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 # handlers are only run when things change, at the very end of each
# play. Let's define some. The names are significant and must # play. Let's define some. The names are significant and must
......
...@@ -22,7 +22,7 @@ class AnsibleError(Exception): ...@@ -22,7 +22,7 @@ class AnsibleError(Exception):
""" """
def __init__(self, msg): def __init__(self, msg):
self.msg = msg self.msg = msg
def __str__(self): def __str__(self):
return self.msg return self.msg
......
...@@ -141,19 +141,19 @@ class PlayBook(object): ...@@ -141,19 +141,19 @@ class PlayBook(object):
# process tasks in this file as well as imported tasks # process tasks in this file as well as imported tasks
new_tasks = [] new_tasks = []
for task in tasks: for task in tasks:
if 'include' in task: if 'include' in task:
self._include_tasks(play, task, dirname, new_tasks) self._include_tasks(play, task, dirname, new_tasks)
else: else:
new_tasks.append(task) new_tasks.append(task)
play['tasks'] = new_tasks play['tasks'] = new_tasks
# process handlers as well as imported handlers # process handlers as well as imported handlers
new_handlers = [] new_handlers = []
for handler in handlers: for handler in handlers:
if 'include' in handler: if 'include' in handler:
self._include_handlers(play, handler, dirname, new_handlers) self._include_handlers(play, handler, dirname, new_handlers)
else: else:
new_handlers.append(handler) new_handlers.append(handler)
play['handlers'] = new_handlers play['handlers'] = new_handlers
return playbook return playbook
...@@ -331,8 +331,8 @@ class PlayBook(object): ...@@ -331,8 +331,8 @@ class PlayBook(object):
# load the module name and parameters from the task entry # load the module name and parameters from the task entry
name = task['name'] name = task['name']
action = task['action'] action = task['action']
async_seconds = int(task.get('async', 0)) # not async by default async_seconds = int(task.get('async', 0)) # not async by default
async_poll_interval = int(task.get('poll', 10)) # default poll = 10 seconds async_poll_interval = int(task.get('poll', 10)) # default poll = 10 seconds
# comment = task.get('comment', '') # comment = task.get('comment', '')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment