##### SUMMARY
Since `add_host` and `group_by` actions only modify the runtime inventory, hosts/groups/vars added by them don't survive a `meta: refresh_inventory` call (since that call completely clears the runtime inventory). 

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
InventoryManager

##### ADDITIONAL INFORMATION
After some internal discussion, the general consensus seemed to be that this behavior is an undesirable default. The `add_host` and `group_by` actions should manage a more persistent state independent of the runtime inventory, then apply their changes to the running inventory. When a `meta: refresh_inventory` occurs, the normal dynamic inventory clear/refresh should happen, then reapply the add_host/group_by state. This should probably be the default behavior, but a config switch or a different `meta` action (or an arg to it) to emulate the current behavior could also be created if necessary.

handler_task.get_name(include_role_fqcn=False),
                                handler_task.get_name(include_role_fqcn=True),
                            )
                            if handler_name in candidates:
                                return handler_task
                        except (UndefinedError, AnsibleUndefinedVariable) as e:
                            
                            
                            
                            
                            if not handler_task.listen:
                                display.warning(
                                    "Handler '%s' is unusable because it has no listen topics and "
                                    "the name could not be templated (host-specific variables are "
                                    "not supported in handler names). The error: %s" % (handler_task.name, to_text(e))
                                )
                            continue
            return None
        cur_pass = 0
        while True:
            try:
                self._results_lock.acquire()
                if do_handlers:
                    task_result = self._handler_results.popleft()
                else:
                    task_result = self._results.popleft()
            except IndexError:
                break
            finally:
                self._results_lock.release()