hmc_pwdpolicy – Manages the list, create, change and remove password policies of the HMC.
Synopsis
Lists Hardware Management Console password policy information by password policies or password policy status.
Creates a password policy.
Change password policies on the Hardware Management Console to activate, deactivate or modify password policy.
Removes a password policy from the Hardware Management Console.
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.
- policy_name (optional, str, None)
The name of the password policy.
- policy_config (optional, dict, None)
Configuration parameters required for the HMC password policies. This option is valid for state like
present,modified.
- pwage (optional, str, None)
The number of days that can elapse before a password expires and must be changed. A value of 99999 indicates no password expiration.
- description (optional, str, None)
Description for the password policy.
- min_pwage (optional, str, None)
The number of days that must elapse before a password can be changed.
- warn_pwage (optional, str, None)
The number of days prior to password expiration when a warning message will begin to be displayed.
- min_length (optional, str, None)
The minimum password length.
- hist_size (optional, str, None)
The number of times a password must be changed before a password can be reused. This value cannot exceed 50.
- min_digits (optional, str, None)
The minimum number of digits that a password must contain.
- min_uppercase_chars (optional, str, None)
The minimum number of uppercase characters that a password must contain.
- min_lowercase_chars (optional, str, None)
The minimum number of lowercase characters that a password must contain.
- min_special_chars (optional, str, None)
The minimum number of special characters that a password must contain. Special characters include symbols, punctuation, and white space characters.
- new_name (optional, str, None)
The new name of the password policy. This option is valid only when state=modified.
- policy_type (optional, str, None)
policiesLists all the password policies on the HMC.
statusLists password policy status information.- state (True, str, None)
The desired password policy state of the target HMC.
presentensure the target HMC is having the mentioned password policy.
modifiedensure the policy on target HMC password is modified.
absentensure the policy on the target HMC password is removed.
factsdoes not change anything on the HMC and returns current policy status/settings of HMC.
activatedensure the policy on the target HMC password is activated.
deactivatedensure the password policy is deactivated on the target HMC.
Notes
Note
All operations support passwordless authentication.
Examples
- name: List the HMC password policy current status
ibm.power_hmc.hmc_pwdpolicy:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
policy_type: status
state: facts
- name: Create the password policy
ibm.power_hmc.hmc_pwdpolicy:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
policy_name: dummy
state: present
policy_config:
- name: Update the password policy with new settings
ibm.power_hmc.hmc_pwdpolicy:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
policy_name: dummy
policy_config:
pwage: 80
hist_size: 12
state: modified
- name: Activate the password policy
ibm.power_hmc.hmc_pwdpolicy:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
policy_name: dummy
state: activated
- name: De-activate any active policy on HMC
ibm.power_hmc.hmc_pwdpolicy:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
state: deactivated
- name: Remove the password policy
ibm.power_hmc.hmc_pwdpolicy:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
policy_name: dummy
state: absent
Return Values
- policy_info (always, dict, )
Respective policy information
Status
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by community.