make fact gathering obey play tags (#44717)

fixes #44251
This commit is contained in:
Brian Coca 2018-11-06 13:19:44 -05:00 committed by GitHub
parent 329d3b892b
commit 4ec2423a04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- fact gathering to obey play tags

View file

@ -175,10 +175,14 @@ class PlayIterator:
setup_task = Task(block=setup_block)
setup_task.action = 'setup'
setup_task.name = 'Gathering Facts'
setup_task.tags = ['always']
setup_task.args = {
'gather_subset': gather_subset,
}
# Unless play is specifically tagged, gathering should 'always' run
if self._play.tags is None:
setup_task.tags = ['always']
if gather_timeout:
setup_task.args['gather_timeout'] = gather_timeout
if fact_path: