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,35 @@
- name: Ad group test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Add active directory group information"
inspur.sm.ad_group:
state: "present"
name: "wbs"
domain: "inspur.com"
pri: "administrator"
kvm: "enable"
vm: "disable"
provider: "{{ ism }}"
- name: "Set active directory group information"
inspur.sm.ad_group:
state: "present"
name: "wbs"
pri: "user"
kvm: "disable"
provider: "{{ ism }}"
- name: "Delete active directory group information"
inspur.sm.ad_group:
state: "absent"
name: "wbs"
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: ad group test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get active directory group information"
inspur.sm.ad_group_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: ad test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get active directory information"
inspur.sm.ad_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: adapter test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get adapter information"
inspur.sm.adapter_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,20 @@
- name: ad group test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "add active directory group information"
inspur.sm.add_ad_group:
name: "wbs"
domain: "inspur.com"
pri: "administrator"
kvm: "enable"
vm: "disable"
provider: "{{ ism }}"

View File

@@ -0,0 +1,20 @@
- name: ldap group test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "add ldap group information"
inspur.sm.add_ldap_group.py:
name: "wbs"
base: "cn=manager"
pri: "administrator"
kvm: "enable"
vm: "disable"
provider: "{{ ism }}"

View File

@@ -0,0 +1,31 @@
- name: add ldisk test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "show pdisk information"
inspur.sm.add_ldisk:
info: "show"
provider: "{{ ism }}"
- name: "add ldisk"
inspur.sm.add_ldisk:
ctrl_id: 0
level: 1
size: 1
access: 1
r: 1
w: 1
io: 1
cache: 1
init: 2
select: 10
slot: 0,1
provider: "{{ ism }}"

View File

@@ -0,0 +1,19 @@
- name: add user test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "add user"
inspur.sm.add_user:
uname: "wbs"
upass: "admin"
role_id: "Administrator"
priv: "kvm,sol"
provider: "{{ ism }}"

View File

@@ -0,0 +1,17 @@
- name: add 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.add_user_group:
name: "test"
pri: "administrator"
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: alert test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get alert policy"
inspur.sm.alert_policy_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,26 @@
- name: bmc audit log test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get bmc audit log information"
inspur.sm.audit_log_info:
log_time: "2020-06-01T12:30+08:00"
provider: "{{ ism }}"
- name: "get bmc audit log information"
inspur.sm.audit_log_info:
count: 30
provider: "{{ ism }}"
- name: "get bmc audit log information"
inspur.sm.audit_log_info:
audit_file: "/home/wbs/wbs.log"
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: Screen test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Get auto capture screen information"
inspur.sm.auto_capture_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: disk backplane test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get backplane information"
inspur.sm.backplane_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,17 @@
- name: backup test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: " backup server settings"
inspur.sm.backup:
bak_file: "/home/wbs/"
item: "all"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: bios test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "export bios config"
inspur.sm.bios_export:
file_url: "/home/wbs/bios.json"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: bios test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "import bios config"
inspur.sm.bios_import:
file_url: "/home/wbs/bios.conf"
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: bios test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get bios setup"
inspur.sm.bios_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: bmc info test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get BMC information"
inspur.sm.bmc_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: Boot image test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Get bmc boot image information"
inspur.sm.boot_image_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: boot test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get bios boot option"
inspur.sm.boot_option_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: clear BMC audit log test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "clear BMC audit log "
inspur.sm.clear_audit_log:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: clear event log test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "clear event log"
inspur.sm.clear_event_log:
provider: "{{ ism }}"

View File

@@ -0,0 +1,21 @@
- name: clear BMC system log test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "clear BMC system log"
inspur.sm.clear_system_log:
level: "alert"
provider: "{{ ism }}"
- name: "clear BMC system log"
inspur.sm.clear_system_log:
level: "all"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: collect blackbox test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "collect blackbox log"
inspur.sm.collect_blackbox:
file_url: "/home/wbs/wbs.log"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: Collect test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Collect logs"
inspur.sm.collect_log:
file_url: "/home/wbs/test.tar"
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: Connect media test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Get remote images redirection information"
inspur.sm.connect_media_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: CPU test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get cpu information"
inspur.sm.cpu_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: ad group test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "delete active directory group information"
inspur.sm.del_ad_group:
name: "inspur"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: ldap group test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "delete ldap group information"
inspur.sm.del_ldap_group:
name: "inspur"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: Delete session test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Delete session"
inspur.sm.del_session:
sid: "223"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: del user test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "del user"
inspur.sm.del_user:
uname: "wbs"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: delete user group test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "delete user group"
inspur.sm.del_user_group:
name: "test"
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: dns test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get dns information"
inspur.sm.dns_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: Screen test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Download auto screenshots"
inspur.sm.download_auto_screenshot:
file_url: "/home/wbs/screen"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: Screen test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Download manual screenshots"
inspur.sm.download_manual_screenshot:
file_url: "/home/wbs/screen"
provider: "{{ ism }}"

View File

@@ -0,0 +1,28 @@
- name: ad test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set active directory information"
inspur.sm.edit_ad:
enable: "disable"
provider: "{{ ism }}"
- name: "set active directory information"
inspur.sm.edit_ad:
enable: "enable"
name: "inspur"
code: "123456"
timeout: 120
domain: "inspur.com"
addr1: "100.2.2.2"
addr2: "100.2.2.3"
addr3: "100.2.2.4"
provider: "{{ ism }}"

View File

@@ -0,0 +1,21 @@
- name: ad group test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "edit active directory group information"
inspur.sm.edit_ad_group:
id: "1"
name: "wbs"
domain: "inspur.com"
pri: "administrator"
kvm: "enable"
vm: "disable"
provider: "{{ ism }}"

View File

@@ -0,0 +1,26 @@
- name: alert policy test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set alert policy"
inspur.sm.edit_alert_policy:
id: 1
status: "enable"
type: "snmp"
destination: "100.2.2.2"
channel: "shared"
provider: "{{ ism }}"
- name: "set alert policy"
inspur.sm.edit_alert_policy:
id: 1
status: "disable"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: Screen test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set auto capture screen"
inspur.sm.edit_auto_capture:
status: "enable"
provider: "{{ ism }}"

View File

@@ -0,0 +1,23 @@
- name: bios test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set bios setup"
inspur.sm.edit_bios:
attribute: "VMX"
value: "Disable"
provider: "{{ ism }}"
- name: "set bios setup"
inspur.sm.edit_bios:
attribute: "VMX"
value: "Enable"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: Boot image test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set bmc boot image"
inspur.sm.edit_boot_image:
image: 2
provider: "{{ ism }}"

View File

@@ -0,0 +1,18 @@
- name: boot test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set bios boot option"
inspur.sm.edit_boot_option:
device: "PXE"
effective: "Once"
mode: "Legacy"
provider: "{{ ism }}"

View File

@@ -0,0 +1,18 @@
- name: Connect media test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set remote image redirection"
inspur.sm.edit_connect_media:
image_type: "CD"
op_type: "start"
image_name: "aa.iso"
provider: "{{ ism }}"

View File

@@ -0,0 +1,41 @@
- name: dns test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set dns information"
inspur.sm.edit_dns:
dns_status: "disable"
provider: "{{ ism }}"
- name: "set dns information"
inspur.sm.edit_dns:
dns_status: "enable"
host_cfg: "manual"
host_name: "123456789"
domain_manual: "auto"
domain_iface: "eth0_v4"
dns_manual: "manual"
dns_server1: "100.2.2.2"
dns_server2: "100.2.2.3"
dns_server3: "100.2.2.4"
provider: "{{ ism }}"
- name: "set dns information"
edit_dns:
dns_status: "enable"
host_cfg: "manual"
host_name: "123456789"
domain_manual: "manual"
domain_name: "inspur.com"
dns_manual: "auto"
dns_iface: "eth0"
dns_priority: "4"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: Event log policy test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set event log policy"
inspur.sm.edit_event_log_policy:
policy: "Linear"
provider: "{{ ism }}"

View File

@@ -0,0 +1,23 @@
- name: fan test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set fan information"
inspur.sm.edit_fan:
mode: "Automatic"
provider: "{{ ism }}"
- name: "set fan information"
inspur.sm.edit_fan:
mode: "Manual"
id: 1
fan_speed: 80
provider: "{{ ism }}"

View File

@@ -0,0 +1,17 @@
- name: Fru test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set Fru"
inspur.sm.edit_fru:
attribute: "CP"
value: "Inspur"
provider: "{{ ism }}"

View File

@@ -0,0 +1,34 @@
- name: ipv4 test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set ipv4 information"
inspur.sm.edit_ipv4:
interface_name: "eth0"
ipv4_status: "disable"
provider: "{{ ism }}"
- name: "set ipv4 information"
inspur.sm.edit_ipv4:
interface_name: "eth0"
ipv4_status: "enable"
ipv4_dhcp_enable: "dhcp"
provider: "{{ ism }}"
- name: "set ipv4 information"
inspur.sm.edit_ipv4:
interface_name: "eth0"
ipv4_status: "enable"
ipv4_dhcp_enable: "static"
ipv4_address: "100.2.36.10"
ipv4_subnet: "255.255.255.0"
ipv4_gateway: "100.2.36.1"
provider: "{{ ism }}"

View File

@@ -0,0 +1,35 @@
- name: ipv6 test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set ipv6 information"
inspur.sm.edit_ipv6:
interface_name: "eth0"
ipv6_status: "disable"
provider: "{{ ism }}"
- name: "set ipv6 information"
inspur.sm.edit_ipv6:
interface_name: "eth0"
ipv6_status: "enable"
ipv6_dhcp_enable: "dhcp"
provider: "{{ ism }}"
- name: "set ipv6 information"
inspur.sm.edit_ipv6:
interface_name: "eth0"
ipv6_status: "enable"
ipv6_dhcp_enable: "static"
ipv6_address: "::ffff:100:2:36:10"
ipv6_index: 12
ipv6_prefix: 16
ipv6_gateway: "::"
provider: "{{ ism }}"

View File

@@ -0,0 +1,22 @@
- name: KVM test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set KVM"
inspur.sm.edit_kvm:
kvm_encryption: "enable"
media_attach: "auto"
keyboard_language: "AD"
retry_count: 13
retry_time_interval: 10
local_monitor_off: "enable"
automatic_off: "enable"
provider: "{{ ism }}"

View File

@@ -0,0 +1,28 @@
- name: ldap test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set ldap information"
inspur.sm.edit_ldap:
enable: "disable"
provider: "{{ ism }}"
- name: "set ldap information"
inspur.sm.edit_ldap:
enable: "enable"
encry: "SSL"
address: "100.2.2.2"
server_port: 389
dn: "cn=manager,ou=login,dc=domain,dc=com"
code: "123456"
base: "cn=manager"
attr: "uid"
provider: "{{ ism }}"

View File

@@ -0,0 +1,21 @@
- name: ldap group test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "edit ldap group information"
inspur.sm.edit_ldap_group:
id: "1"
name: "wbs"
base: "cn=manager"
pri: "administrator"
kvm: "enable"
vm: "disable"
provider: "{{ ism }}"

View File

@@ -0,0 +1,23 @@
- name: edit ldisk test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "show ldisk information"
inspur.sm.edit_ldisk:
info: "show"
provider: "{{ ism }}"
- name: "edit ldisk"
inspur.sm.edit_ldisk:
ctrl_id: 0
ldisk_id: 1
option: "LOC"
provider: "{{ ism }}"

View File

@@ -0,0 +1,25 @@
- name: edit log setting test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "edit bmc system log setting"
inspur.sm.edit_log_setting:
status: "enable"
type: "both"
provider: "{{ ism }}"
- name: "edit bmc audit log setting"
inspur.sm.edit_log_setting:
audit_status: "enable"
audit_type: "remote"
server_addr: "100.2.126.11"
server_port: "514"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: Screen test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set manual capture screen"
inspur.sm.edit_manual_capture:
type: "capture"
provider: "{{ ism }}"

View File

@@ -0,0 +1,24 @@
- name: Media instance test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set media instance"
inspur.sm.edit_media_instance:
num_fd: 1
num_cd: 1
num_hd: 1
kvm_num_fd: 1
kvm_num_cd: 1
kvm_num_hd: 1
sd_media: "Enable"
secure_channel: "Enable"
power_save_mode: "Enable"
provider: "{{ ism }}"

View File

@@ -0,0 +1,19 @@
- name: NCSI test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set ncsi information"
inspur.sm.edit_ncsi:
mode: "manual"
nic_type: "PCIE"
interface_name: "eth0"
channel_number: 1
provider: "{{ ism }}"

View File

@@ -0,0 +1,17 @@
- name: network test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set network information"
inspur.sm.edit_network:
interface_name: "eth0"
lan_enable: "enable"
provider: "{{ ism }}"

View File

@@ -0,0 +1,18 @@
- name: bond test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set network bond"
inspur.sm.edit_network_bond:
bond: "enable"
interface: "dedicated"
auto_config: "enable"
provider: "{{ ism }}"

View File

@@ -0,0 +1,25 @@
- name: link test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set network link"
inspur.sm.edit_network_link:
interface: "dedicated"
auto_nego: "enable"
provider: "{{ ism }}"
- name: "Set network link"
inspur.sm.edit_network_link:
interface: "dedicated"
auto_nego: "disable"
link_speed: 100
duplex_mode: "FULL"
provider: "{{ ism }}"

View File

@@ -0,0 +1,28 @@
- name: NTP test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set ntp"
inspur.sm.edit_ntp:
auto_date: "enable"
server2: "time.nist.gov"
provider: "{{ ism }}"
- name: "set ntp"
inspur.sm.edit_ntp:
auto_date: "disable"
ntp_time: "20200609083600"
provider: "{{ ism }}"
- name: "set ntp"
inspur.sm.edit_ntp:
time_zone: 8
provider: "{{ ism }}"

View File

@@ -0,0 +1,17 @@
- name: edit user password test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "change user password"
inspur.sm.edit_pass_user:
uname: "wbs"
upass: "admin1"
provider: "{{ ism }}"

View File

@@ -0,0 +1,23 @@
- name: Edit pdisk test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Show pdisk information"
inspur.sm.edit_pdisk:
info: "show"
provider: "{{ ism }}"
- name: "Edit pdisk"
inspur.sm.edit_pdisk:
ctrl_id: 0
device_id: 1
option: "LOC"
provider: "{{ ism }}"

View File

@@ -0,0 +1,47 @@
- name: Power budget test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Get power budget range"
inspur.sm.edit_power_budget:
range: True
provider: "{{ ism }}"
- name: "add power budget"
inspur.sm.edit_power_budget:
action: "add"
id: 1
watts: 1500
start1: 2
end1: 5
week1:
- Mon
- Wed
- Fri
provider: "{{ ism }}"
- name: "Set power budget status to open"
inspur.sm.edit_power_budget:
action: "open"
id: 1
provider: "{{ ism }}"
- name: "Set power budget status to close"
inspur.sm.edit_power_budget:
action: "close"
id: 1
provider: "{{ ism }}"
- name: "Delete power budget"
inspur.sm.edit_power_budget:
action: "delete"
id: 1
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: power restore test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set power restore information"
inspur.sm.edit_power_restore:
option: "on"
provider: "{{ ism }}"

View File

@@ -0,0 +1,16 @@
- name: power status test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set power status information"
inspur.sm.edit_power_status:
state: "On"
provider: "{{ ism }}"

View File

@@ -0,0 +1,31 @@
- name: Preserve test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set preserve all"
inspur.sm.edit_preserve_config:
setting: "all"
provider: "{{ ism }}"
- name: "Set preserve none"
inspur.sm.edit_preserve_config:
setting: "none"
provider: "{{ ism }}"
- name: "Set preserve manual"
inspur.sm.edit_preserve_config:
setting: "manual"
override:
- "fru"
- "ntp"
- "network"
- "user"
provider: "{{ ism }}"

View File

@@ -0,0 +1,18 @@
- name: edit user privilege test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "change user privilege"
inspur.sm.edit_priv_user:
uname: "wbs"
role_id: "Administrator"
priv: "kvm,sol"
provider: "{{ ism }}"

View File

@@ -0,0 +1,17 @@
- name: psu config test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set psu config information"
inspur.sm.edit_psu_config:
id: 1
switch: "active"
provider: "{{ ism }}"

View File

@@ -0,0 +1,22 @@
- name: psu peak test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set psu peak information"
inspur.sm.edit_psu_peak:
status: "disable"
provider: "{{ ism }}"
- name: "set psu peak information"
inspur.sm.edit_psu_peak:
status: "enable"
time: 10
provider: "{{ ism }}"

View File

@@ -0,0 +1,26 @@
- name: Restore default test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set restore default auto"
inspur.sm.edit_restore_factory_default:
setting: "all"
provider: "{{ ism }}"
- name: "Set restore default manual"
inspur.sm.edit_restore_factory_default:
mode: "manual"
override:
- fru
- ntp
- network
- user
provider: "{{ ism }}"

View File

@@ -0,0 +1,18 @@
- name: edit service test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "edit kvm"
inspur.sm.edit_service:
service_name: "kvm"
state: "active"
timeout: "1200"
provider: "{{ ism }}"

View File

@@ -0,0 +1,33 @@
- name: smtp test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set smtp information"
inspur.sm.edit_smtp:
interface: "eth0"
email: "inspur@Inspur.com"
primary_status: "enable"
primary_ip: "100.2.2.2"
primary_name: "inspur"
primary_auth: "disable"
provider: "{{ ism }}"
- name: "set smtp information"
inspur.sm.edit_smtp:
interface: "eth0"
email: "inspur@Inspur.com"
primary_status: "enable"
primary_ip: "100.2.2.2"
primary_name: "inspur"
primary_auth: "enable"
primary_username: "test"
primary_password: "123456"
provider: "{{ ism }}"

View File

@@ -0,0 +1,26 @@
- name: Smtp com test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set smtp com information"
inspur.sm.edit_smtp_com:
status: "disable"
provider: "{{ ism }}"
- name: "Set smtp com information"
inspur.sm.edit_smtp_com:
status: "enable"
server_ip: "100.2.2.2"
email: "inspur@Inspur.com"
server_auth: "enable"
server_username: "admin"
server_password: 1234qwer!@#$"
provider: "{{ ism }}"

View File

@@ -0,0 +1,25 @@
- name: Smtp dest test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set smtp dest information"
inspur.sm.edit_smtp_dest:
id: 1
status: "disable"
provider: "{{ ism }}"
- name: "Set smtp dest information"
inspur.sm.edit_smtp_dest:
id: 1
status: "enable"
address: "wbs@inspur.com"
description: "test"
provider: "{{ ism }}"

View File

@@ -0,0 +1,17 @@
- name: trap test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set snmp get/set"
inspur.sm.edit_snmp:
community: "test"
v3username: "Inspur"
provider: "{{ ism }}"

View File

@@ -0,0 +1,32 @@
- name: trap test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set snmp trap v2c"
inspur.sm.edit_snmp_trap:
version: "2c"
event_severity: "warning"
community: "test"
system_name: "Inspur"
provider: "{{ ism }}"
- name: "set snmp trap v3"
inspur.sm.edit_snmp_trap:
version: "3"
event_severity: "all"
v3username: "Inspur"
engine_id: "1234567890"
auth_protocol: "SHA"
auth_password: "12345678"
priv_protocol: "AES"
priv_password: "123454678"
trap_port: 162
provider: "{{ ism }}"

View File

@@ -0,0 +1,17 @@
- name: Threshold test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set threshold information"
inspur.sm.edit_threshold:
name: "GPU1_Temp"
uc: 94
provider: "{{ ism }}"

View File

@@ -0,0 +1,22 @@
- name: UID test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set uid"
inspur.sm.edit_uid:
led: "on"
time: 10
provider: "{{ ism }}"
- name: "Set uid"
inspur.sm.edit_uid:
led: "off"
provider: "{{ ism }}"

View File

@@ -0,0 +1,17 @@
- name: set user group test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set user group"
inspur.sm.edit_user_group:
name: "test"
pri: "administrator"
provider: "{{ ism }}"

View File

@@ -0,0 +1,27 @@
- name: Media test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Set local media"
inspur.sm.edit_virtual_media:
local_media_support: "Enable"
provider: "{{ ism }}"
- name: "Set remote media"
inspur.sm.edit_virtual_media:
remote_media_support: "Enable"
mount_type: 0
same_settings: 0
mount: "Enable"
remote_server_address: "100.2.28.203"
remote_source_path: "/data/nfs/server/"
remote_share_type: "nfs"
provider: "{{ ism }}"

View File

@@ -0,0 +1,25 @@
- name: vlan test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set vlan information"
inspur.sm.edit_vlan:
interface_name: "eth0"
vlan_status: "disable"
provider: "{{ ism }}"
- name: "set vlan information"
inspur.sm.edit_vlan:
interface_name: "eth0"
vlan_status: "enable"
vlan_id: 2
vlan_priority: 1
provider: "{{ ism }}"

View File

@@ -0,0 +1,26 @@
- name: eventlog info test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get event log information"
inspur.sm.event_log_info:
log_time: "2020-06-01T12:30+08:00"
provider: "{{ ism }}"
- name: "get event log information"
inspur.sm.event_log_info:
count: 30
provider: "{{ ism }}"
- name: "get event log information"
inspur.sm.event_log_info:
event_file: "/home/wbs/wbs.log"
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: Event log policy test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Get event log policy information"
inspur.sm.event_log_policy_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: fan test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get fan information"
inspur.sm.fan_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: fru info test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get fru information"
inspur.sm.fru_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: firmware version test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get firmware version information"
inspur.sm.fw_version_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: GPU test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Get gpu information"
inspur.sm.gpu_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: hard disk test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get hard disk information"
inspur.sm.hard_disk_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: KVM test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Get KVM information"
inspur.sm.kvm_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,35 @@
- name: Ldap group test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Add ldap group information"
inspur.sm.ldap_group:
state: "present"
name: "wbs"
base: "cn=manager"
pri: "administrator"
kvm: "enable"
vm: "disable"
provider: "{{ ism }}"
- name: "Set ldap group information"
inspur.sm.ldap_group:
state: "present"
name: "wbs"
pri: "user"
kvm: "disable"
provider: "{{ ism }}"
- name: "Delete ldap group information"
inspur.sm.ldap_group:
state: "absent"
name: "wbs"
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: ldap group test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get ldap group information"
inspur.sm.ldap_group_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: ldap test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get ldap information"
inspur.sm.ldap_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: ldisk test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get logical disks information"
inspur.sm.ldisk_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: bmc log setting test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get bmc log setting information"
inspur.sm.log_setting_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: Media instance test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Get Virtual Media Instance information"
inspur.sm.media_instance_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: memory test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get memory information"
inspur.sm.mem_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: ncsi test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "set ncsi information"
inspur.sm.ncsi_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: bond test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "Get network bond information"
inspur.sm.network_bond_info:
provider: "{{ ism }}"

View File

@@ -0,0 +1,15 @@
- name: network test
hosts: ism
connection: local
gather_facts: no
vars:
ism:
host: "{{ ansible_ssh_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: "get network information"
inspur.sm.network_info:
provider: "{{ ism }}"

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