diff --git a/lib/ansible/playbook/__init__.py b/lib/ansible/playbook/__init__.py index ba3e7418ae..52c77d72dd 100644 --- a/lib/ansible/playbook/__init__.py +++ b/lib/ansible/playbook/__init__.py @@ -301,6 +301,9 @@ class PlayBook(object): # add facts to the global setup cache for host, result in contacted.iteritems(): + # Skip register variable if host is skipped + if result.get('skipped', False): + continue facts = result.get('ansible_facts', {}) self.SETUP_CACHE[host].update(facts) if task.register: