sample_role_cpm_remove_instance¶
For configuration and setup, see Playbook Documentation.
This sample playbook shows how to remove the deprovisioned instance in z/OSMF Cloud Provisioning & Management (CP&M).
- name: sample of removing software instance
hosts: cpmHost1
gather_facts: no
collections:
- ibm.ibm_zos_zosmf
vars_prompt:
- name: zmf_user
prompt: "Enter your zOSMF username"
private: no
- name: zmf_password
prompt: "Enter your zOSMF password"
private: yes
tasks:
- include_role:
name: zmf_cpm_remove_software_instance
vars:
instance_info_json_path: "/{{ instance_record_dir }}/{{ instanceID }}-{{ externalName }}.json""<full-instance-json-file-path>" # The value for property instance_info_json_path identifies full file path of the provisioned instance json file that is created by zmf_cpm_provision_software_service role, common format is /{{ instance_record_dir }}/{{ instanceID }}-{{ externalName }}.json
Note
For CP&M roles, the inventory file hosts needs to be updated to identify the target z/OSMF end points.
For more details about role variables, see zmf_cpm_remove_software_instance.