Browse Source

Add option for fact cache expiry (#1602)

* Add option for fact cache expiry 

By adding the `fact_caching_timeout` we avoid having really stale/invalid data ending up in there. 
Leaving commented out by default, for backwards compatibility, but nice to have there.

* Enabled cache-expiry by default

Set to 2 hours and modified comment to reflect change
pull/1635/head
Yorgos Saslis 7 years ago
committed by Matthew Mosesohn
parent
commit
fb30f65951
1 changed files with 3 additions and 0 deletions
  1. 3
      ansible.cfg

3
ansible.cfg

@ -7,6 +7,9 @@ host_key_checking=False
gathering = smart gathering = smart
fact_caching = jsonfile fact_caching = jsonfile
fact_caching_connection = /tmp fact_caching_connection = /tmp
# Once created, fact cache is never force updated. This is why the tiemeout exists. If you're still getting
# stale data in your runs (e.g. stale `etcd_access_addresses`), you might want to use `--flush-cache`.
fact_caching_timeout = 7200 # 2 hours
stdout_callback = skippy stdout_callback = skippy
library = ./library library = ./library
callback_whitelist = profile_tasks callback_whitelist = profile_tasks

Loading…
Cancel
Save