Merge branch 'master' of github.com:mpdehaan/ansible

pull/3/head
Michael DeHaan 12 years ago
commit 302cc37c79

@ -15,6 +15,9 @@
- name: execute bin false
comment: call something that will fail just to demo failure counts and such
action: command /bin/false
- name: execute bin true
comment: this will never be executed because previous will fail
action: command /bin/true
handlers:
- name: restart apache
action: service name=httpd state=restarted

@ -110,6 +110,14 @@ class PlayBook(object):
# actions where not all hosts have changed
# though top-level tasks will pass in "None" here
host_list = self.host_list
host_list = ansible.runner.Runner.parse_hosts(host_list)
# do not continue to run tasks on hosts that have had failures
new_hosts = []
for x in host_list:
if not self.failures.has_key(x):
new_hosts.append(x)
host_list = new_hosts
# load the module name and parameters from the task
# entry

@ -66,7 +66,7 @@ class Runner(object):
'''
# save input values
self.host_list = self._parse_hosts(host_list)
self.host_list = self.parse_hosts(host_list)
self.module_path = module_path
self.module_name = module_name
self.forks = forks
@ -78,7 +78,8 @@ class Runner(object):
self.remote_pass = remote_pass
self._tmp_paths = {}
def _parse_hosts(self, host_list):
@classmethod
def parse_hosts(cls, host_list):
''' parse the host inventory file if not sent as an array '''
# if the host list is given as a string load the host list

Loading…
Cancel
Save