mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
-p has been replaced by a required option. Various docs changes.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ]
|
||||
|
||||
Reference in New Issue
Block a user