mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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
This commit is contained in:
parent
cbb5d1e5d5
commit
23041c3b6c
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue