Annotate more files, fix missing imports messing with playbooks. Hey Tim, please test your stuff :)

This commit is contained in:
Michael DeHaan
2012-03-13 19:19:54 -04:00
parent 238fffd6ef
commit 09a7119e74
7 changed files with 119 additions and 23 deletions

View File

@@ -20,6 +20,7 @@
import ansible.runner
import ansible.constants as C
from ansible.utils import *
from ansible.errors import *
import yaml
import shlex
import os
@@ -87,6 +88,8 @@ class PlayBook(object):
def _get_vars(self, play, dirname):
vars = play.get('vars', {})
if type(vars) != dict:
raise AnsibleError("'vars' section must contain only key/value pairs")
vars_files = play.get('vars_files', [])
for f in vars_files:
path = path_dwim(dirname, f)

View File

@@ -429,7 +429,10 @@ class Runner(object):
# find hosts that match the pattern
hosts = self.match_hosts(self.pattern)
if len(hosts) == 0:
return None
return {
'contacted' : {},
'dark' : {}
}
# attack pool of hosts in N forks
# _executor_hook does all of the work