mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
Fix undefined variables, basestring usage, and some associated python3 issues
This commit is contained in:
parent
9f7b0dfc30
commit
225fa5d092
84 changed files with 652 additions and 963 deletions
|
@ -101,12 +101,14 @@ ansible_net_interfaces:
|
|||
returned: when interfaces is configured
|
||||
type: dict
|
||||
"""
|
||||
import re
|
||||
import itertools
|
||||
import re
|
||||
import traceback
|
||||
|
||||
from ansible.module_utils.network import NetworkModule
|
||||
from ansible.module_utils.six import iteritems
|
||||
from ansible.module_utils.six.moves import zip
|
||||
from ansible.module_utils._text import to_native
|
||||
|
||||
|
||||
class FactsBase(object):
|
||||
|
@ -283,9 +285,8 @@ def main():
|
|||
inst.populate()
|
||||
failed_commands.extend(inst.failed_commands)
|
||||
facts.update(inst.facts)
|
||||
except Exception:
|
||||
exc = get_exception()
|
||||
module.fail_json(msg=str(exc))
|
||||
except Exception as exc:
|
||||
module.fail_json(msg=to_native(exc), exception=traceback.format_exc())
|
||||
|
||||
ansible_facts = dict()
|
||||
for key, value in iteritems(facts):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue