summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Coca <bcoca@users.noreply.github.com>2019-07-22 17:59:22 -0400
committerToshio Kuratomi <a.badger@gmail.com>2019-07-22 18:45:06 -0700
commit89963a0062668ff6e7bae94cbd8576ecac8142db (patch)
treec2d70a42ced9821cca1a39575f0082d273df51fe
parent18fc915b1560a0fac3aba7728ce7d3a1b7edb43c (diff)
downloadansible-89963a0062668ff6e7bae94cbd8576ecac8142db.tar.gz
Fix gather facts ignoring gather_subsets config (#59271)
* Fix gather facts ignoring gather_subsets config fixes #58728 * Update lib/ansible/playbook/play.py Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit 8a886a6bee30fbb29835558f939a585007eaec67)
-rw-r--r--changelogs/fragments/gather_subset_defaults.yml2
-rw-r--r--lib/ansible/playbook/play.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/changelogs/fragments/gather_subset_defaults.yml b/changelogs/fragments/gather_subset_defaults.yml
new file mode 100644
index 0000000000..7db2ef753a
--- /dev/null
+++ b/changelogs/fragments/gather_subset_defaults.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - Gather facts should use gather_subset config by default.
diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py
index 010ec8c7e8..e01b6141f8 100644
--- a/lib/ansible/playbook/play.py
+++ b/lib/ansible/playbook/play.py
@@ -58,7 +58,7 @@ class Play(Base, Taggable, Become, CollectionSearch):
# Facts
_gather_facts = FieldAttribute(isa='bool', default=None, always_post_validate=True)
- _gather_subset = FieldAttribute(isa='list', default=None, listof=string_types, always_post_validate=True)
+ _gather_subset = FieldAttribute(isa='list', default=(lambda: C.DEFAULT_GATHER_SUBSET), listof=string_types, always_post_validate=True)
_gather_timeout = FieldAttribute(isa='int', default=C.DEFAULT_GATHER_TIMEOUT, always_post_validate=True)
_fact_path = FieldAttribute(isa='string', default=C.DEFAULT_FACT_PATH)