##### 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.

is_set_fact = original_task.action in C._ACTION_SET_FACT
                                if not is_set_fact or cacheable:
                                    self._variable_manager.set_host_facts(target_host, result_item['ansible_facts'].copy())
                                if is_set_fact:
                                    self._variable_manager.set_nonpersistent_facts(target_host, result_item['ansible_facts'].copy())
                    if 'ansible_stats' in result_item and 'data' in result_item['ansible_stats'] and result_item['ansible_stats']['data']:
                        if 'per_host' not in result_item['ansible_stats'] or result_item['ansible_stats']['per_host']:
                            host_list = self.get_task_hosts(iterator, original_host, original_task)
                        else:
                            host_list = [None]
                        data = result_item['ansible_stats']['data']
                        aggregate = 'aggregate' in result_item['ansible_stats'] and result_item['ansible_stats']['aggregate']
                        for myhost in host_list:
                            for k in data.keys():
                                if aggregate:
                                    self._tqm._stats.update_custom_stats(k, data[k], myhost)
                                else:
                                    self._tqm._stats.set_custom_stats(k, data[k], myhost)
                if 'diff' in task_result._result:
                    if self._diff or getattr(original_task, 'diff', False):
                        self._tqm.send_callback('v2_on_file_diff', task_result)
                if not isinstance(original_task, TaskInclude):
                    self._tqm._stats.increment('ok', original_host.name)
                    if 'changed' in task_result._result and task_result._result['changed']:
                        self._tqm._stats.increment('changed', original_host.name)