From ec00c9c64e491ac761c2ac97b39efeee4147c778 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Thu, 28 Apr 2022 21:09:49 +0200 Subject: [PATCH] Deprecate FACT_PATH/GATHER_SUBSET/GATHER_TIMEOUT defaults (#77656) --- ...-gather_subset-gather_timeout-defaults.yml | 2 + lib/ansible/config/base.yml | 39 +++++++++---------- 2 files changed, 20 insertions(+), 21 deletions(-) create mode 100644 changelogs/fragments/deprecate-fact_path-gather_subset-gather_timeout-defaults.yml diff --git a/changelogs/fragments/deprecate-fact_path-gather_subset-gather_timeout-defaults.yml b/changelogs/fragments/deprecate-fact_path-gather_subset-gather_timeout-defaults.yml new file mode 100644 index 00000000000..65d7b79f984 --- /dev/null +++ b/changelogs/fragments/deprecate-fact_path-gather_subset-gather_timeout-defaults.yml @@ -0,0 +1,2 @@ +deprecated_features: + - "``DEFAULT_FACT_PATH``, ``DEFAULT_GATHER_SUBSET`` and ``DEFAULT_GATHER_TIMEOUT`` are deprecated and will be removed in 2.18. Use ``module_defaults`` keyword instead." diff --git a/lib/ansible/config/base.yml b/lib/ansible/config/base.yml index e88a3a5fb06..ee98f7483f5 100644 --- a/lib/ansible/config/base.yml +++ b/lib/ansible/config/base.yml @@ -617,13 +617,12 @@ DEFAULT_FACT_PATH: ini: - {key: fact_path, section: defaults} type: string - # TODO: deprecate in 2.14 - #deprecated: - # # TODO: when removing set playbook/play.py to default=None - # why: the module_defaults keyword is a more generic version and can apply to all calls to the - # M(ansible.builtin.gather_facts) or M(ansible.builtin.setup) actions - # version: "2.18" - # alternatives: module_defaults + deprecated: + # TODO: when removing set playbook/play.py to default=None + why: the module_defaults keyword is a more generic version and can apply to all calls to the + M(ansible.builtin.gather_facts) or M(ansible.builtin.setup) actions + version: "2.18" + alternatives: module_defaults DEFAULT_FILTER_PLUGIN_PATH: name: Jinja2 Filter Plugins Path default: '{{ ANSIBLE_HOME ~ "/plugins/filter:/usr/share/ansible/plugins/filter" }}' @@ -679,13 +678,12 @@ DEFAULT_GATHER_SUBSET: section: defaults version_added: "2.1" type: list - # TODO: deprecate in 2.14 - #deprecated: - # # TODO: when removing set playbook/play.py to default=None - # why: the module_defaults keyword is a more generic version and can apply to all calls to the - # M(ansible.builtin.gather_facts) or M(ansible.builtin.setup) actions - # version: "2.18" - # alternatives: module_defaults + deprecated: + # TODO: when removing set playbook/play.py to default=None + why: the module_defaults keyword is a more generic version and can apply to all calls to the + M(ansible.builtin.gather_facts) or M(ansible.builtin.setup) actions + version: "2.18" + alternatives: module_defaults DEFAULT_GATHER_TIMEOUT: name: Gather facts timeout description: @@ -695,13 +693,12 @@ DEFAULT_GATHER_TIMEOUT: ini: - {key: gather_timeout, section: defaults} type: integer - # TODO: deprecate in 2.14 - #deprecated: - # # TODO: when removing set playbook/play.py to default=None - # why: the module_defaults keyword is a more generic version and can apply to all calls to the - # M(ansible.builtin.gather_facts) or M(ansible.builtin.setup) actions - # version: "2.18" - # alternatives: module_defaults + deprecated: + # TODO: when removing set playbook/play.py to default=None + why: the module_defaults keyword is a more generic version and can apply to all calls to the + M(ansible.builtin.gather_facts) or M(ansible.builtin.setup) actions + version: "2.18" + alternatives: module_defaults DEFAULT_HASH_BEHAVIOUR: name: Hash merge behaviour default: replace