From b2c0abe9988126861a4e3186dbf1a695d2bdb827 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Tue, 2 Feb 2016 10:22:08 -0500 Subject: [PATCH] Don't mark host as having gathered facts when peeking at next task Fixes #14243 --- lib/ansible/executor/play_iterator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/executor/play_iterator.py b/lib/ansible/executor/play_iterator.py index 182643246f..e46a8d1507 100644 --- a/lib/ansible/executor/play_iterator.py +++ b/lib/ansible/executor/play_iterator.py @@ -255,10 +255,11 @@ class PlayIterator: (gathering == 'explicit' and boolean(self._play.gather_facts)) or \ (gathering == 'smart' and implied and not host._gathered_facts): # mark the host as having gathered facts - host.set_gathered_facts(True) setup_block = self._blocks[0] if setup_block.has_tasks() and len(setup_block.block) > 0: task = setup_block.block[0] + if not peek: + host.set_gathered_facts(True) else: state.pending_setup = False