From b047591dee1a098714434a93e92bf35dd53f9e34 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 9 Nov 2018 08:41:07 -0500 Subject: [PATCH] fix tagged implicit gathering (#48294) * fix tagged implicit gathering - None is not tHe default anymore, its an empty list * Update changelogs/fragments/fix_taggged_gather.yml Co-Authored-By: bcoca --- changelogs/fragments/fix_taggged_gather.yml | 2 ++ lib/ansible/executor/play_iterator.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/fix_taggged_gather.yml diff --git a/changelogs/fragments/fix_taggged_gather.yml b/changelogs/fragments/fix_taggged_gather.yml new file mode 100644 index 0000000000..5e36e09738 --- /dev/null +++ b/changelogs/fragments/fix_taggged_gather.yml @@ -0,0 +1,2 @@ +bugfixes: + - now default is ``list`` so ``None`` is bad comparison for gathering diff --git a/lib/ansible/executor/play_iterator.py b/lib/ansible/executor/play_iterator.py index 289bb867ec..9bd78c932d 100644 --- a/lib/ansible/executor/play_iterator.py +++ b/lib/ansible/executor/play_iterator.py @@ -180,7 +180,7 @@ class PlayIterator: } # Unless play is specifically tagged, gathering should 'always' run - if self._play.tags is None: + if not self._play.tags: setup_task.tags = ['always'] if gather_timeout: