power_system – PowerOn, PowerOff, modify_syscfg, modify_hwres, facts of the Managed system
Synopsis
Poweron specified managed system.
Poweroff specified managed system.
Modify System configuration of the specified managed system with specified configuration details.
Modify hardware resource of the specified managed system with specified hardware resource details.
Get the facts of the specified managed system.
Enable and Disable PCM metrics.
Parameters
- hmc_host (True, str, None)
The IP address or hostname of the HMC.
- hmc_auth (True, dict, None)
Username and Password credential of the HMC.
- username (True, str, None)
Username of the HMC to log in.
- password (optional, str, None)
Password of the HMC.
- system_name (True, str, None)
The name or MTMS (machine type model serial) of the managed system.
- new_name (optional, str, None)
The new name to be configured on specified system_name.
This option works with
modify_syscfgaction.- power_off_policy (optional, int, None)
Power off policy to be configured on specified system_name.
This option works with
modify_syscfgaction.Configuring this option to ‘1’ will power off the Managed System after all partitions are shutdown.
- power_on_lpar_start_policy (optional, str, None)
Power on partition start policy to be configured on specified system_name for the next system restart.
This option works with
modify_syscfgaction.- requested_num_sys_huge_pages (optional, int, None)
Configures the number of pages of huge page memory.
User can change this value only when the managed system is powered off.
This option works with
modify_hwresaction.- mem_mirroring_mode (optional, str, None)
Configures the memory mirroring mode on specified system_name for the next system poweron or system restart.
User can use this option on only managed systems which supports memory mirroring.
This option works with
modify_hwresaction.- pend_mem_region_size (optional, str, None)
Configures the memory region size setting on specified system_name.
choices are in MB.
This option works with
modify_hwresaction.- metrics (optional, list, None)
Provides five types of utilization data
Long Term Monitor(LTM), Short Term Monitor(STM), Aggregated metrics(AM), ComputeLTM(CLTM), EnergyMonitor(EM).
AM collects data from LTM and EM, hence when the AM is enabled automatically LTM and EM will be enabled.
When LTM or EM is disabled then automatically the AM will also get disabled.
This option works only with
enable_pcmanddisable_pcmaction.- action (optional, str, None)
poweroffpoweroff a specified system_name.
poweronpoweron a specified system_name.
modify_syscfgMakes system configurations of specified system_name.
modify_hwresMakes hardware resource configurations of specified system_name.
enable_pcmEnables the Performance and Capacity Monitoring for specified types of utilization data.
disable_pcmDisables the Performance and Capacity Monitoring for specified types of utilization data.- state (optional, str, None)
factsfetch details of specified system_name
pcm_factsfetch Performance and Capacity Monitoring details of specified system_name
Notes
Note
All operations except facts support passwordless authentication.
Examples
- name: Poweroff managed system
ibm.power_hmc.power_system:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
action: poweroff
- name: Poweron managed system
ibm.power_hmc.power_system:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
action: poweron
- name: Modify managed system name, powerOn lpar start policy and powerOff policy
ibm.power_hmc.power_system:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
new_name: <system_name_to_be_changed>
power_off_policy: '1'
power_on_lpar_start_policy: autostart
action: modify_syscfg
- name: Modify managed system memory settings
ibm.power_hmc.power_system:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
requested_num_sys_huge_pages: <sys_huge_pages_to_be_set>
mem_mirroring_mode: sys_firmware_only
pend_mem_region_size: auto
action: modify_hwres
- name: Fetch the managed system details
ibm.power_hmc.power_system:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
state: facts
- name: Fetch facts about monitoring metrics
ibm.power_hmc.power_system:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
state: pcm_facts
- name: Enable the long-term monitoring
ibm.power_hmc.power_system:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
metrics:
- LTM
action: enable_pcm
- name: Disable the short-term monitoring
ibm.power_hmc.power_system:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
metrics:
- STM
action: disable_pcm
Return Values
- system_info (always, dict, )
Respective System information
Status
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by community.