From 8ad2bc31a3b45dfa7125953a510c6ad0e63542f7 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 21:52:52 +0200 Subject: [PATCH] [PR #10271/40fb0f0c backport][stable-9] Inventory plugins: remove deprecated disable_lookups parameter (which was set to its default anyway) (#10275) Inventory plugins: remove deprecated disable_lookups parameter (which was set to its default anyway) (#10271) * Remove default value for keyword argument that is deprecated since ansible-core 2.19. * Add changelog fragment. (cherry picked from commit 40fb0f0c75909fa8a9f9f77d6b41a3fda9612b9d) Co-authored-by: Felix Fontein --- changelogs/fragments/10271--disable_lookups.yml | 3 +++ plugins/inventory/icinga2.py | 6 +++--- plugins/inventory/linode.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/10271--disable_lookups.yml diff --git a/changelogs/fragments/10271--disable_lookups.yml b/changelogs/fragments/10271--disable_lookups.yml new file mode 100644 index 0000000000..d28e2ac833 --- /dev/null +++ b/changelogs/fragments/10271--disable_lookups.yml @@ -0,0 +1,3 @@ +bugfixes: + - "icinga2 inventory plugin - avoid using deprecated option when templating options (https://github.com/ansible-collections/community.general/pull/10271)." + - "linode inventory plugin - avoid using deprecated option when templating options (https://github.com/ansible-collections/community.general/pull/10271)." diff --git a/plugins/inventory/icinga2.py b/plugins/inventory/icinga2.py index d1f2bc617f..6184ac49e8 100644 --- a/plugins/inventory/icinga2.py +++ b/plugins/inventory/icinga2.py @@ -296,11 +296,11 @@ class InventoryModule(BaseInventoryPlugin, Constructable): self.group_by_hostgroups = self.get_option('group_by_hostgroups') if self.templar.is_template(self.icinga2_url): - self.icinga2_url = self.templar.template(variable=self.icinga2_url, disable_lookups=False) + self.icinga2_url = self.templar.template(variable=self.icinga2_url) if self.templar.is_template(self.icinga2_user): - self.icinga2_user = self.templar.template(variable=self.icinga2_user, disable_lookups=False) + self.icinga2_user = self.templar.template(variable=self.icinga2_user) if self.templar.is_template(self.icinga2_password): - self.icinga2_password = self.templar.template(variable=self.icinga2_password, disable_lookups=False) + self.icinga2_password = self.templar.template(variable=self.icinga2_password) self.icinga2_url = self.icinga2_url.rstrip('/') + '/v1' diff --git a/plugins/inventory/linode.py b/plugins/inventory/linode.py index 5c9a4718f5..295618b9e8 100644 --- a/plugins/inventory/linode.py +++ b/plugins/inventory/linode.py @@ -146,7 +146,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): access_token = self.get_option('access_token') if self.templar.is_template(access_token): - access_token = self.templar.template(variable=access_token, disable_lookups=False) + access_token = self.templar.template(variable=access_token) if access_token is None: raise AnsibleError((