From 8130ed8de0bc1174bb9a9c585a73771cf53b4215 Mon Sep 17 00:00:00 2001 From: Devin Christensen Date: Tue, 2 Dec 2014 14:23:38 -0700 Subject: [PATCH] Allow .gitkeep in the jsonfile fact cache dir --- lib/ansible/cache/jsonfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/cache/jsonfile.py b/lib/ansible/cache/jsonfile.py index 81918a2836b..8b4c892a401 100644 --- a/lib/ansible/cache/jsonfile.py +++ b/lib/ansible/cache/jsonfile.py @@ -98,7 +98,7 @@ class CacheModule(BaseCacheModule): def keys(self): keys = [] for k in os.listdir(self._cache_dir): - if not self.has_expired(k): + if not (k.startswith('.') or self.has_expired(k)): keys.append(k) return keys