Fixing more v2 issues with integration tests

This commit is contained in:
James Cammarata
2015-01-26 23:41:02 -06:00
parent 6f5d18a20e
commit bbd08cd0e2
7 changed files with 58 additions and 25 deletions

View File

@@ -57,7 +57,7 @@ class CallbackModule(CallbackBase):
msg = "ok: [%s]" % result._host.get_name()
color = 'green'
if self._display._verbosity > 0 or 'verbose_always' in result._result:
if (self._display._verbosity > 0 or 'verbose_always' in result._result) and result._task.action != 'setup':
indent = None
if 'verbose_always' in result._result:
indent = 4
@@ -97,7 +97,7 @@ class CallbackModule(CallbackBase):
pass
def playbook_on_no_hosts_matched(self):
pass
self._display.display("skipping: no hosts matched", color='cyan')
def playbook_on_no_hosts_remaining(self):
self._print_banner("NO MORE HOSTS LEFT")

View File

@@ -28,7 +28,7 @@ from ansible.inventory.host import Host
from ansible.inventory.group import Group
from ansible.playbook.helpers import compile_block_list
from ansible.playbook.role import ROLE_CACHE
from ansible.playbook.role import ROLE_CACHE, hash_params
from ansible.plugins import module_loader
from ansible.utils.debug import debug
@@ -149,7 +149,8 @@ class StrategyBase:
# lookup the role in the ROLE_CACHE to make sure we're dealing
# with the correct object and mark it as executed
for (entry, role_obj) in ROLE_CACHE[task_result._task._role._role_name].iteritems():
hashed_entry = frozenset(task_result._task._role._role_params.iteritems())
#hashed_entry = frozenset(task_result._task._role._role_params.iteritems())
hashed_entry = hash_params(task_result._task._role._role_params)
if entry == hashed_entry :
role_obj._had_task_run = True