community.sap_libs.sap_task_list_execute module – Perform SAP Task list execution
Note
This module is part of the community.sap_libs collection (version 1.4.2).
You might already have this collection installed if you are using the ansible
package.
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 community.sap_libs
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.sap_libs.sap_task_list_execute
.
New in community.sap_libs 0.1.0
Synopsis
The community.sap_libs.sap_task_list_execute module depends on
pyrfc
Python library (version 2.4.0 and upwards). Depending on distribution you are using, you may need to install additional packages to have these available.Tasks in the task list which requires manual activities will be confirmed automatically.
This module will use the RFC package
STC_TM_API
.
Requirements
The below requirements are needed on the host that executes this module.
pyrfc >= 2.4.0
xmltodict
Parameters
Parameter |
Comments |
---|---|
The client number to connect to. You must quote the value to ensure retaining the leading zeros. Default: |
|
The required password for the SAP system. |
|
The required username for the SAP system. |
|
The required host for the SAP system. Can be either an FQDN or IP Address. |
|
The system number of the SAP system. You must quote the value to ensure retaining the leading zeros. Default: |
|
The tasks and the parameters for execution. If the task list does not need any parameters, this could be empty. If only specific tasks from the task list should be executed, the tasks even when no parameter is needed must be provided alongside with the module parameter task_skip=true. |
|
The name of the field of the task. |
|
The name of the task in the task list. |
|
The value which have to be set. |
|
Setting for the execution of the task list. This can be the following as in TCODE SE80 described. Check Mode Default: |
|
If this parameter is This could be the case when only certain tasks should run from the task list. Choices:
|
|
The task list which will be executed. |
Notes
Note
Does not support
check_mode
. Always returns that the state has changed.
Examples
# Pass in a message
- name: Test task execution
community.sap_libs.sap_task_list_execute:
conn_username: DDIC
conn_password: Passwd1234
host: 10.1.8.10
sysnr: '01'
client: '000'
task_to_execute: SAP_BASIS_SSL_CHECK
task_settings: batch
- name: Pass in input parameters
community.sap_libs.sap_task_list_execute:
conn_username: DDIC
conn_password: Passwd1234
host: 10.1.8.10
sysnr: '00'
client: '000'
task_to_execute: SAP_BASIS_SSL_CHECK
task_parameters :
- { 'TASKNAME': 'CL_STCT_CHECK_SEC_CRYPTO', 'FIELDNAME': 'P_OPT2', 'VALUE': 'X' }
- TASKNAME: CL_STCT_CHECK_SEC_CRYPTO
FIELDNAME: P_OPT3
VALUE: X
task_settings: batch
# Exported environment variables
- name: Hint if module will fail with error message like ImportError libsapnwrfc.so...
community.sap_libs.sap_task_list_execute:
conn_username: DDIC
conn_password: Passwd1234
host: 10.1.8.10
sysnr: '00'
client: '000'
task_to_execute: SAP_BASIS_SSL_CHECK
task_settings: batch
environment:
SAPNWRFC_HOME: /usr/local/sap/nwrfcsdk
LD_LIBRARY_PATH: /usr/local/sap/nwrfcsdk/lib
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A small execution description. Returned: always Sample: |
|
A complete description of the executed tasks. If this is available. Returned: on success Sample: |