Init: mediaserver

This commit is contained in:
2023-02-08 12:13:28 +01:00
parent 848bc9739c
commit f7c23d4ba9
31914 changed files with 6175775 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
# -*- coding:utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
class ModuleDocFragment(object):
# Standard files documentation fragment
DOCUMENTATION = r'''
options:
provider:
description:
- A dict object containing connection details.
type: dict
suboptions:
host:
description:
- Specifies the DNS host name or address for connecting to the remote
device over the specified transport. The value of host is used as
the destination address for the transport.
type: str
username:
description:
- Configures the username to use to authenticate the connection to
the remote device. If the value is not specified in the task, the value of environment
variable C(ANSIBLE_NET_USERNAME) will be used instead.
type: str
password:
description:
- Specifies the password to use to authenticate the connection to
the remote device. If the value is not specified in the task, the
value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead.
type: str
host:
description:
- Specifies the DNS host name or address for connecting to the remote
device over the specified transport. The value of host is used as
the destination address for the transport.
type: str
username:
description:
- Configures the username to use to authenticate the connection to
the remote device. If the value is not specified in the task, the value of environment
variable C(ANSIBLE_NET_USERNAME) will be used instead.
type: str
password:
description:
- Specifies the password to use to authenticate the connection to
the remote device. If the value is not specified in the task, the
value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead.
type: str
'''

View File

@@ -0,0 +1,54 @@
# -*- coding:utf-8 -*-
# Copyright (c), Inspur isib-group, 2020
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
try:
import ism
ism_temp = True
except ImportError:
ism_temp = False
from ansible.module_utils.basic import env_fallback
from ansible.module_utils.six import iteritems
ism_provider_spec = {
'host': dict(type='str'),
'username': dict(type='str', fallback=(env_fallback, ['ANSIBLE_NET_USERNAME'])),
'password': dict(type='str', fallback=(env_fallback, ['ANSIBLE_NET_PASSWORD']), no_log=True),
}
ism_argument_spec = {
'provider': dict(type='dict', options=ism_provider_spec),
}
ism_top_spec = {
'host': dict(type='str'),
'username': dict(type='str'),
'password': dict(type='str', no_log=True),
}
ism_argument_spec.update(ism_top_spec)
def load_params(module):
"""load_params"""
provider = module.params.get('provider') or dict()
for key, value in iteritems(provider):
if key in ism_argument_spec:
if module.params.get(key) is None and value is not None:
module.params[key] = value
def get_connection(module):
"""get_connection"""
load_params(module)
# result = dict()
# if module.check_mode:
# result['changed'] = True
# result['state'] = 'Success'
# result['message'] = module.params['subcommand']
# else:
dict_param = module.params
if not ism_temp:
module.fail_json(msg='inspur_sdk must be installed to use this module')
result = ism.main(dict_param)
return result

Some files were not shown because too many files have changed in this diff Show More