From 23041c3b6cc40d9f7fd325afb924448aa91fdf38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fr=C3=A9d=C3=A9ric?= Date: Thu, 6 Jul 2017 01:20:18 +0200 Subject: [PATCH] Fix error with `meta: clear_facts` (#26406) Using `meta: clear_facts` was failing with `coercing to Unicode: need string or buffer, Host found` This applies the same fix as 3101e24. Fixes #26405 --- lib/ansible/plugins/strategy/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py index 8cb918f50a..786ec66447 100644 --- a/lib/ansible/plugins/strategy/__init__.py +++ b/lib/ansible/plugins/strategy/__init__.py @@ -866,7 +866,8 @@ class StrategyBase: elif meta_action == 'clear_facts': if _evaluate_conditional(target_host): for host in self._inventory.get_hosts(iterator._play.hosts): - self._variable_manager.clear_facts(host) + hostname = host.get_name() + self._variable_manager.clear_facts(hostname) msg = "facts cleared" else: skipped = True