mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-08-17 16:21:21 +02:00
Prevent deprecation warnings when using ansible-core 2.19. (#385)
This commit is contained in:
parent
9099fcd698
commit
1c182725ce
3 changed files with 4 additions and 6 deletions
2
changelogs/fragments/384-warnings.yml
Normal file
2
changelogs/fragments/384-warnings.yml
Normal 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)."
|
|
@ -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__':
|
||||||
|
|
|
@ -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__':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue