From 9a8399d5778445bd5542c998cb75158e802ce17e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toshio=20=E3=81=8F=E3=82=89=E3=81=A8=E3=81=BF?= Date: Sat, 5 Nov 2016 18:45:04 +0000 Subject: [PATCH] Fix list-vms-per-host script Ansible-2.2 introduced more special result vars. Omit all tresults vars starting with '_ansible' to compensate. --- scripts/list-vms-per-host | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/list-vms-per-host b/scripts/list-vms-per-host index a689a2bed7..8178aa8dab 100755 --- a/scripts/list-vms-per-host +++ b/scripts/list-vms-per-host @@ -1,6 +1,6 @@ #!/usr/bin/python -tt # Author: Toshio Kuratomi -# Copyright: December, 2015 +# Copyright: December 2015, November 2016 # License: LGPLv3+ import sys import copy @@ -23,7 +23,7 @@ class ResultAccumulator(CallbackBase): self.unreachable.add(result._host.get_name()) def v2_runner_on_ok(self, result, *args, **kwargs): - for vm in (vm for vm in result._result.keys() if vm not in ('invocation', 'changed', '_ansible_no_log')): + for vm in (vm for vm in result._result.keys() if vm not in ('invocation', 'changed') and not vm.startswith('_ansible')): self.host_status[(result._host.get_name(), vm)] = (result._result[vm]['state'], str(result._result[vm]['autostart']))