-p has been replaced by a required option. Various docs changes.

This commit is contained in:
Michael DeHaan
2012-03-01 22:10:47 -05:00
parent 4ce1f1dd5e
commit 847846af0e
7 changed files with 89 additions and 77 deletions

View File

@@ -19,8 +19,8 @@
# control side (aka 'overlord')
DEFAULT_HOST_LIST = '/etc/ansible/hosts'
DEFAULT_MODULE_PATH = '/usr/share/ansible'
DEFAULT_MODULE_NAME = 'ping'
DEFAULT_PATTERN = '*'
DEFAULT_MODULE_NAME = 'command'
DEFAULT_PATTERN = None
DEFAULT_FORKS = 3
DEFAULT_MODULE_ARGS = ''
DEFAULT_TIMEOUT = 10

View File

@@ -151,6 +151,11 @@ class PlayBook(object):
remote_user=remote_user
)
results = runner.run()
# if no hosts are matched, carry on, unlike /bin/ansible
# which would warn you about this
if results is None:
results = {}
# walk through the results and build up
# summary information about successes and

View File

@@ -326,7 +326,9 @@ class Runner(object):
# find hosts that match the pattern
hosts = self.match_hosts(self.pattern)
if len(hosts) == 0:
return None
# attack pool of hosts in N forks
# _executor_hook does all of the work
hosts = [ (self,x) for x in hosts ]