sap.sap_operations.pcs_resources filter – Get pcs cluster resources lists
Note
This filter plugin is part of the sap.sap_operations collection.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install sap.sap_operations
.
To use it in a playbook, specify: sap.sap_operations.pcs_resources
.
New in sap.sap_operations 1.6.0-galaxy
Synopsis
Get pcs cluster resources lists from sap.sap_operations.pcs_cib_info or sap.sap_operations.pcs_status result
Depending on parameters provided, this filter will return list of pcs resources
Output of this filter is different for pcs_cib_info and pcs_status result
Primitive, clone and group resources are supported
Several parameters can be provided to filter pcs resources at once, for instance: List all pcs resources with id that contains ‘HANA’ sap.sap_operations.pcs_resources(id_contains=’HANA’, resource_agent_class=’ocf’)
Keyword parameters
This describes keyword parameters of the filter. These are the values key1=value1
, key2=value2
and so on in the following
example: input | sap.sap_operations.pcs_resources(key1=value1, key2=value2, ...)
Parameter |
Comments |
---|---|
Id of the pcs resource. All resources with this id will be returned. |
|
String that should be contained in pcs resource id. All resources with id that contains this string will be returned. |
|
Class of resource agent for pcs resource All resources with resource agent class will be returned. |
|
Provider of resource agent for pcs resource. All resources with resource agent provider will be returned. |
|
Type of resource agent for pcs resource. All resources with resource agent type will be returned. |
|
Result of sap.sap_operations.pcs_cib_info or sap.sap_operations.pcs_status execution |
Notes
Note
This module is experimental
Module interface (parameters, output) might change in future releases
Module interface (parameters, output) might change in future patches
Module might be removed in future releases
Module released only on Ansible galaxy and is not yet planned to be released on Ansible Automation Hub
Examples
- name: Get cluster CIB
sap.sap_operations.pcs_cib_info:
register: pcs_cib_info
- name: Get cluster status
sap.sap_operations.pcs_status_info:
register: pcs_status_info
- name: Print pcs_resources
ansible.builtin.debug:
msg:
- "{{ pcs_cib_info | sap.sap_operations.pcs_resources }}"
- "{{ pcs_cib_info | sap.sap_operations.pcs_resources(id='dummy') }}"
- "{{ pcs_status_info | sap.sap_operations.pcs_resources }}"
- "{{ pcs_status_info | sap.sap_operations.pcs_resources(id_contains='dummy') }}"
Return Value
Key |
Description |
---|---|
List of pcs resources filtered by provided parameters Returned: Success and when sap.sap_operations.pcs_status_info output is provided Sample: |
|
List of pcs resources filtered by provided parameters Returned: Success and when sap.sap_operations.pcs_cib_info output is provided Sample: |