diff options
author | Brian Coca <bcoca@users.noreply.github.com> | 2019-07-22 17:59:22 -0400 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2019-07-22 18:45:06 -0700 |
commit | 89963a0062668ff6e7bae94cbd8576ecac8142db (patch) | |
tree | c2d70a42ced9821cca1a39575f0082d273df51fe | |
parent | 18fc915b1560a0fac3aba7728ce7d3a1b7edb43c (diff) | |
download | ansible-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.yml | 2 | ||||
-rw-r--r-- | lib/ansible/playbook/play.py | 2 |
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) |