mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
parent
51b595992b
commit
630185cb20
11 changed files with 134 additions and 149 deletions
|
@ -18,4 +18,3 @@
|
||||||
# Make coding more python3-ish
|
# Make coding more python3-ish
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
|
@ -40,4 +40,3 @@ if 'action_write_locks' not in globals():
|
||||||
mods.update(('copy', 'file', 'setup', 'slurp', 'stat'))
|
mods.update(('copy', 'file', 'setup', 'slurp', 'stat'))
|
||||||
for mod_name in mods:
|
for mod_name in mods:
|
||||||
action_write_locks[mod_name] = Lock()
|
action_write_locks[mod_name] = Lock()
|
||||||
|
|
||||||
|
|
|
@ -837,6 +837,7 @@ def modify_module(module_name, module_path, module_args, task_vars=dict(), modul
|
||||||
|
|
||||||
return (b_module_data, module_style, to_text(shebang, nonstring='passthru'))
|
return (b_module_data, module_style, to_text(shebang, nonstring='passthru'))
|
||||||
|
|
||||||
|
|
||||||
def build_windows_module_payload(module_name, module_path, b_module_data, module_args, task_vars, task, play_context, environment):
|
def build_windows_module_payload(module_name, module_path, b_module_data, module_args, task_vars, task, play_context, environment):
|
||||||
exec_manifest = dict(
|
exec_manifest = dict(
|
||||||
module_entry=to_text(base64.b64encode(b_module_data)),
|
module_entry=to_text(base64.b64encode(b_module_data)),
|
||||||
|
|
|
@ -130,6 +130,7 @@ class HostState:
|
||||||
new_state.always_child_state = self.always_child_state.copy()
|
new_state.always_child_state = self.always_child_state.copy()
|
||||||
return new_state
|
return new_state
|
||||||
|
|
||||||
|
|
||||||
class PlayIterator:
|
class PlayIterator:
|
||||||
|
|
||||||
# the primary running states for the play iteration
|
# the primary running states for the play iteration
|
||||||
|
@ -270,7 +271,6 @@ class PlayIterator:
|
||||||
display.debug(" ^ state is: %s" % s)
|
display.debug(" ^ state is: %s" % s)
|
||||||
return (s, task)
|
return (s, task)
|
||||||
|
|
||||||
|
|
||||||
def _get_next_task_from_state(self, state, host, peek, in_child=False):
|
def _get_next_task_from_state(self, state, host, peek, in_child=False):
|
||||||
|
|
||||||
task = None
|
task = None
|
||||||
|
@ -567,4 +567,3 @@ class PlayIterator:
|
||||||
for b in task_list:
|
for b in task_list:
|
||||||
self.cache_block_tasks(b)
|
self.cache_block_tasks(b)
|
||||||
self._host_states[host.name] = self._insert_tasks_into_state(self.get_host_state(host), task_list)
|
self._host_states[host.name] = self._insert_tasks_into_state(self.get_host_state(host), task_list)
|
||||||
|
|
||||||
|
|
|
@ -18,4 +18,3 @@
|
||||||
# Make coding more python3-ish
|
# Make coding more python3-ish
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
|
@ -167,4 +167,3 @@ class WorkerProcess(multiprocessing.Process):
|
||||||
# ps.print_stats()
|
# ps.print_stats()
|
||||||
# with open('worker_%06d.stats' % os.getpid(), 'w') as f:
|
# with open('worker_%06d.stats' % os.getpid(), 'w') as f:
|
||||||
# f.write(s.getvalue())
|
# f.write(s.getvalue())
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ from collections import MutableMapping
|
||||||
|
|
||||||
from ansible.utils.vars import merge_hash
|
from ansible.utils.vars import merge_hash
|
||||||
|
|
||||||
|
|
||||||
class AggregateStats:
|
class AggregateStats:
|
||||||
''' holds stats about per-host activity during playbook runs '''
|
''' holds stats about per-host activity during playbook runs '''
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ class AggregateStats:
|
||||||
failures=self.failures.get(host, 0),
|
failures=self.failures.get(host, 0),
|
||||||
unreachable=self.dark.get(host, 0),
|
unreachable=self.dark.get(host, 0),
|
||||||
changed=self.changed.get(host, 0),
|
changed=self.changed.get(host, 0),
|
||||||
skipped = self.skipped.get(host, 0)
|
skipped=self.skipped.get(host, 0),
|
||||||
)
|
)
|
||||||
|
|
||||||
def set_custom_stats(self, which, what, host=None):
|
def set_custom_stats(self, which, what, host=None):
|
||||||
|
@ -83,4 +84,3 @@ class AggregateStats:
|
||||||
else:
|
else:
|
||||||
# let overloaded + take care of other types
|
# let overloaded + take care of other types
|
||||||
self.custom[host][which] += what
|
self.custom[host][which] += what
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ class TaskExecutor:
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
elif isinstance(res, list):
|
elif isinstance(res, list):
|
||||||
for idx,item in enumerate(res):
|
for (idx, item) in enumerate(res):
|
||||||
res[idx] = _clean_res(item, errors=errors)
|
res[idx] = _clean_res(item, errors=errors)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
@ -189,7 +189,6 @@ class TaskExecutor:
|
||||||
# get search path for this task to pass to lookup plugins
|
# get search path for this task to pass to lookup plugins
|
||||||
self._job_vars['ansible_search_path'] = self._task.get_search_path()
|
self._job_vars['ansible_search_path'] = self._task.get_search_path()
|
||||||
|
|
||||||
|
|
||||||
templar = Templar(loader=self._loader, shared_loader_obj=self._shared_loader_obj, variables=self._job_vars)
|
templar = Templar(loader=self._loader, shared_loader_obj=self._shared_loader_obj, variables=self._job_vars)
|
||||||
items = None
|
items = None
|
||||||
if self._task.loop:
|
if self._task.loop:
|
||||||
|
|
|
@ -332,7 +332,7 @@ class TaskQueueManager:
|
||||||
# <WorkerProcess(WorkerProcess-2, stopped[SIGTERM])>
|
# <WorkerProcess(WorkerProcess-2, stopped[SIGTERM])>
|
||||||
|
|
||||||
defunct = False
|
defunct = False
|
||||||
for idx,x in enumerate(self._workers):
|
for (idx, x) in enumerate(self._workers):
|
||||||
if hasattr(x[0], 'exitcode'):
|
if hasattr(x[0], 'exitcode'):
|
||||||
if x[0].exitcode in [-9, -11, -15]:
|
if x[0].exitcode in [-9, -11, -15]:
|
||||||
defunct = True
|
defunct = True
|
||||||
|
|
|
@ -10,20 +10,10 @@ lib/ansible/cli/playbook.py
|
||||||
lib/ansible/cli/pull.py
|
lib/ansible/cli/pull.py
|
||||||
lib/ansible/cli/vault.py
|
lib/ansible/cli/vault.py
|
||||||
lib/ansible/constants.py
|
lib/ansible/constants.py
|
||||||
lib/ansible/executor/__init__.py
|
|
||||||
lib/ansible/executor/action_write_locks.py
|
|
||||||
lib/ansible/executor/module_common.py
|
|
||||||
lib/ansible/executor/play_iterator.py
|
|
||||||
lib/ansible/executor/playbook_executor.py
|
|
||||||
lib/ansible/executor/process/__init__.py
|
|
||||||
lib/ansible/executor/process/worker.py
|
|
||||||
lib/ansible/executor/stats.py
|
|
||||||
lib/ansible/executor/task_executor.py
|
|
||||||
lib/ansible/executor/task_queue_manager.py
|
|
||||||
lib/ansible/inventory/manager.py
|
|
||||||
lib/ansible/inventory/data.py
|
lib/ansible/inventory/data.py
|
||||||
lib/ansible/inventory/group.py
|
lib/ansible/inventory/group.py
|
||||||
lib/ansible/inventory/host.py
|
lib/ansible/inventory/host.py
|
||||||
|
lib/ansible/inventory/manager.py
|
||||||
lib/ansible/module_utils/_text.py
|
lib/ansible/module_utils/_text.py
|
||||||
lib/ansible/module_utils/a10.py
|
lib/ansible/module_utils/a10.py
|
||||||
lib/ansible/module_utils/ansible_tower.py
|
lib/ansible/module_utils/ansible_tower.py
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue