mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
committed by
John R Barker
parent
d5ad3093d6
commit
51b595992b
@@ -23,20 +23,20 @@ import ast
|
||||
import random
|
||||
import uuid
|
||||
|
||||
from json import dumps
|
||||
from collections import MutableMapping
|
||||
from json import dumps
|
||||
|
||||
from ansible.module_utils.six import iteritems, string_types
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.errors import AnsibleError, AnsibleOptionsError
|
||||
from ansible.parsing.splitter import parse_kv
|
||||
from ansible.module_utils.six import iteritems, string_types
|
||||
from ansible.module_utils._text import to_native, to_text
|
||||
from ansible.parsing.splitter import parse_kv
|
||||
|
||||
|
||||
_MAXSIZE = 2**32
|
||||
cur_id = 0
|
||||
node_mac = ("%012x" % uuid.getnode())[:12]
|
||||
_MAXSIZE = 2 ** 32
|
||||
cur_id = 0
|
||||
node_mac = ("%012x" % uuid.getnode())[:12]
|
||||
random_int = ("%08x" % random.randint(0, _MAXSIZE))[:8]
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ def get_unique_id():
|
||||
("%012x" % cur_id)[:12],
|
||||
])
|
||||
|
||||
|
||||
def _validate_mutable_mappings(a, b):
|
||||
"""
|
||||
Internal convenience function to ensure arguments are MutableMappings
|
||||
|
||||
Reference in New Issue
Block a user