Prevent deprecation warnings when using ansible-core 2.19. (#385)
Some checks are pending
Collection Docs / Build Ansible Docs (push) Waiting to run
Collection Docs / Publish Ansible Docs (push) Blocked by required conditions
nox / Run extra sanity tests (push) Waiting to run
nox / ansible-test (push) Waiting to run

This commit is contained in:
Felix Fontein 2025-07-25 22:26:39 +02:00 committed by GitHub
parent 9099fcd698
commit 1c182725ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 6 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "facts and api_facts modules - prevent deprecation warnings when used with ansible-core 2.19 (https://github.com/ansible-collections/community.routeros/pull/384)."

View file

@ -419,8 +419,6 @@ FACT_SUBSETS = dict(
VALID_SUBSETS = frozenset(FACT_SUBSETS.keys()) VALID_SUBSETS = frozenset(FACT_SUBSETS.keys())
warnings = []
def main(): def main():
argument_spec = dict( argument_spec = dict(
@ -485,7 +483,7 @@ def main():
key = 'ansible_net_%s' % key key = 'ansible_net_%s' % key
ansible_facts[key] = value ansible_facts[key] = value
module.exit_json(ansible_facts=ansible_facts, warnings=warnings) module.exit_json(ansible_facts=ansible_facts)
if __name__ == '__main__': if __name__ == '__main__':

View file

@ -589,8 +589,6 @@ FACT_SUBSETS = dict(
VALID_SUBSETS = frozenset(FACT_SUBSETS.keys()) VALID_SUBSETS = frozenset(FACT_SUBSETS.keys())
warnings = list()
def main(): def main():
"""main entry point for module execution """main entry point for module execution
@ -653,7 +651,7 @@ def main():
key = 'ansible_net_%s' % key key = 'ansible_net_%s' % key
ansible_facts[key] = value ansible_facts[key] = value
module.exit_json(ansible_facts=ansible_facts, warnings=warnings) module.exit_json(ansible_facts=ansible_facts)
if __name__ == '__main__': if __name__ == '__main__':