zmf_authenticate – Authenticate with z/OSMF server¶
Synopsis¶
Authenticate with z/OSMF server by either username/password or HTTPS client authenticate.
Return the authentication credentials for successful authentication.
The credential can be then used for succeeding Ansible tasks which call z/OSMF Ansible module or role.
Parameters¶
- zmf_crt
Location of the PEM-formatted certificate chain file to be used for HTTPS client authentication.
Required when zmf_user and zmf_password are not supplied.
required: Falsetype: str- zmf_host
Hostname of the z/OSMF server.
required: Truetype: str- zmf_key
Location of the PEM-formatted file with your private key to be used for HTTPS client authentication.
Required when zmf_user and zmf_password are not supplied.
required: Falsetype: str- zmf_password
Password to be used for authenticating with z/OSMF server.
Required when zmf_crt and zmf_key are not supplied.
If zmf_crt and zmf_key are supplied, zmf_user and zmf_password are ignored.
required: Falsetype: str- zmf_port
Port number of the z/OSMF server.
required: Falsetype: int- zmf_user
User name to be used for authenticating with z/OSMF server.
Required when zmf_crt and zmf_key are not supplied.
If zmf_crt and zmf_key are supplied, zmf_user and zmf_password are ignored.
required: Falsetype: str
Examples¶
- name: Authenticate with z/OSMF server by username/password
zmf_authenticate:
zmf_host: "sample.ibm.com"
zmf_user: "your_username"
zmf_password: "your_password"
- name: Authenticate with z/OSMF server by HTTPS client authenticate
zmf_authenticate:
zmf_host: "sample.ibm.com"
zmf_crt: "/file_with_your_certificate_chain.crt"
zmf_key: "/file_with_your_private_key.key"
- name: Authenticate with z/OSMF server by prompting to input the sensitive username/password when running the playbook
vars_prompt:
- name: zmf_user
prompt: "Enter your zOSMF username"
private: no
- name: zmf_password
prompt: "Enter your zOSMF password"
private: yes
tasks:
- zmf_authenticate:
zmf_host: "{{ zmf_host }}"
zmf_port: "{{ zmf_port }}"
zmf_user: "{{ zmf_user }}"
zmf_password: "{{ zmf_password }}"
Return Values¶
- changed
Indicates if any change is made during the module operation.
returned: alwaystype: bool- LtpaToken2
The value of Lightweight Third Party Access (LTPA) token, which supports strong encryption.
returned: on successtype: strsample:
"yDS7uJxqrd3h8v5WXq9pf1yPtztQ4JzroZN3XQKF26ZicXgHc7mdzgycMCudvhxM+JWpC9TzhM4SEHRe/Vb3dC......"
- jwtToken
The value of JSON Web token, which supports strong encryption.
returned: on successtype: strsample:
"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiQmVhcmVyIiwic3ViIjoiem9zbWZhZ....."
- zmf_host
Hostname of the z/OSMF server.
returned: on successtype: str- zmf_port
Port number of the z/OSMF server.
returned: on successtype: int