summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhijeet Kasurde <akasurde@redhat.com>2025-01-21 18:33:22 +0100
committerGitHub <noreply@github.com>2025-01-21 18:33:22 +0100
commitb51ec9412eeee5c652d1f85ce14014c02987fbd5 (patch)
treea3aed04316cce0f0dc21eb3deaef1d5691361086
parentstdout callback first comment (#84533) (diff)
downloadansible-b51ec9412eeee5c652d1f85ce14014c02987fbd5.tar.xz
ansible-b51ec9412eeee5c652d1f85ce14014c02987fbd5.zip
cache: deprecated API first_order_merge (#84568)
* deprecated legacy method first_order_merge Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
-rw-r--r--changelogs/fragments/deprecate_api.yml3
-rw-r--r--lib/ansible/vars/fact_cache.py4
2 files changed, 7 insertions, 0 deletions
diff --git a/changelogs/fragments/deprecate_api.yml b/changelogs/fragments/deprecate_api.yml
new file mode 100644
index 0000000000..41429413ec
--- /dev/null
+++ b/changelogs/fragments/deprecate_api.yml
@@ -0,0 +1,3 @@
+---
+deprecated_features:
+ - fact_cache - deprecate first_order_merge API (https://github.com/ansible/ansible/pull/84568).
diff --git a/lib/ansible/vars/fact_cache.py b/lib/ansible/vars/fact_cache.py
index ce0dc3a331..d68add9d1c 100644
--- a/lib/ansible/vars/fact_cache.py
+++ b/lib/ansible/vars/fact_cache.py
@@ -58,6 +58,10 @@ class FactCache(MutableMapping):
self._plugin.flush()
def first_order_merge(self, key, value):
+ display.deprecated(
+ "API 'first_order_merge' is deprecated, please update the usage",
+ version="2.22"
+ )
host_facts = {key: value}
try: