mirror of
https://github.com/ansible/awx.git
synced 2026-02-16 02:30:01 -03:30
support clear_facts
This commit is contained in:
@@ -104,8 +104,7 @@ class CacheModule(BaseCacheModule):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def delete(self, key):
|
def delete(self, key):
|
||||||
self.mc.delete(self.translate_host_key(key))
|
self.set(key, {})
|
||||||
self.mc.delete(self.translate_modified_key(key))
|
|
||||||
|
|
||||||
def flush(self):
|
def flush(self):
|
||||||
host_names = self.mc.get(self.host_names_key)
|
host_names = self.mc.get(self.host_names_key)
|
||||||
|
|||||||
@@ -17,3 +17,7 @@ Tower will always inject the host `ansible_facts` into memcached. The Ansible To
|
|||||||
## Tower Fact Logging
|
## Tower Fact Logging
|
||||||
New and changed facts will be logged via Tower's logging facility. Specifically, to the `system_tracking` namespace or logger. The logging payload will include the fields: `host_name`, `inventory_id`, and `ansible_facts`. Where `ansible_facts` is a dictionary of all ansible facts for `host_name` in Tower Inventory `inventory_id`.
|
New and changed facts will be logged via Tower's logging facility. Specifically, to the `system_tracking` namespace or logger. The logging payload will include the fields: `host_name`, `inventory_id`, and `ansible_facts`. Where `ansible_facts` is a dictionary of all ansible facts for `host_name` in Tower Inventory `inventory_id`.
|
||||||
|
|
||||||
|
## Integration Testing
|
||||||
|
* ensure `clear_facts` set's `hosts/<id>/ansible_facts` to `{}`
|
||||||
|
* ensure that `gather_facts: False` does NOT result in clearing existing facts
|
||||||
|
* ensure that the when a host fact timeout is reached, that the facts are not used from the cache
|
||||||
|
|||||||
Reference in New Issue
Block a user