chore(realms): refactor modules

This commit is contained in:
2022-06-18 11:41:59 +02:00
parent de246c384c
commit b3238ff47b
4 changed files with 33 additions and 32 deletions

View File

@ -5,15 +5,17 @@
__metaclass__ = type
import dataclasses
import json
import traceback
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.finallycoffee.proxmox.plugins.module_utils.common import *
from ansible_collections.finallycoffee.proxmox.plugins.module_utils.proxmox_datacenter_realm import *
LIB_IMP_ERR = None
try:
from ansible_collections.finallycoffee.proxmox.plugins.module_utils.proxmox_api import *
from ansible_collections.finallycoffee.proxmox.plugins.module_utils.proxmox_datacenter_realm import set_realm_data
HAS_LIB = True
except:
HAS_LIB = False

View File

@ -10,13 +10,8 @@ import traceback
from ansible.module_utils.basic import AnsibleModule
LIB_IMP_ERR = None
try:
from ansible_collections.finallycoffee.proxmox.plugins.module_utils.proxmox_api import *
HAS_LIB = True
except:
HAS_LIB = False
LIB_IMP_ERR = traceback.format_exc()
from ansible_collections.finallycoffee.proxmox.plugins.module_utils.common import *
from ansible_collections.finallycoffee.proxmox.plugins.module_utils.proxmox_datacenter_realm import *
DOCUMENTATION = r'''