[PR #10271/40fb0f0c backport][stable-9] Inventory plugins: remove deprecated disable_lookups parameter (which was set to its default anyway) (#10275)
Some checks failed
EOL CI / EOL Sanity (Ⓐ2.13) (push) Has been cancelled
EOL CI / EOL Sanity (Ⓐ2.14) (push) Has been cancelled
EOL CI / EOL Sanity (Ⓐ2.15) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.13+py2.7) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.13+py3.8) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.14+py3.9) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py3.10) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py3.5) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/3/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/3/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/3/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/3/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/3/) (push) Has been cancelled
nox / Run extra sanity tests (push) Has been cancelled

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 40fb0f0c75)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2025-06-18 21:52:52 +02:00 committed by GitHub
parent 8b3fb0b6c0
commit 8ad2bc31a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 4 deletions

View file

@ -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)."

View file

@ -296,11 +296,11 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
self.group_by_hostgroups = self.get_option('group_by_hostgroups') self.group_by_hostgroups = self.get_option('group_by_hostgroups')
if self.templar.is_template(self.icinga2_url): 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): 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): 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' self.icinga2_url = self.icinga2_url.rstrip('/') + '/v1'

View file

@ -146,7 +146,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
access_token = self.get_option('access_token') access_token = self.get_option('access_token')
if self.templar.is_template(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: if access_token is None:
raise AnsibleError(( raise AnsibleError((