ibmi_module_config – Configures managed nodes settings
Synopsis
The
ibmi_module_config
module configures the managed nodes settings, like module log settings.
Parameters
- config_dir
The configuration file directory.
When set to
home
, the configurations takes effect for the current user.When set to
etc
, the configurations takes effect for all the users.required: falsetype: strdefault: homechoices: etc, home- log_dir
The directory of the modules log file.
required: falsetype: strdefault: /var/log- log_file
The modules log file name.
required: falsetype: strdefault: ibmi_ansible_modules.log- log_level
The log level setting.
critical > error > warning > info > debug
debug, print all the log
info, print info,warning,error,critical
warning, print warning,error,critical
error, print error,critical
critical, print critical only
required: falsetype: strdefault: infochoices: debug, info, warning, error, critical- max_log_size_mb
The maximum size of the modules log file, if the log file is larger that this value, an archive(zip) will be occurred.
required: falsetype: intdefault: 5- no_log
If set to
true
, no module log will be written on managed nodes.required: falsetype: bool- section
The section to be configured.
When set to
dump
, the current configuration will be displayedrequired: Truetype: strchoices: log_config, dump
Examples
- name: Config the logging as debug level
ibm.power_ibmi.ibmi_module_config:
section: log_config
config_dir: home
log_level: debug
See Also
Return Values
- version
The module version string.returned: alwaystype: strsample: 1.0.0- rc
The return code (0 means success, non-zero means failure).returned: alwaystype: intsample: 255- msg
The message descript the return valuereturned: alwaystype: strsample: Success to confiure Ansible module settings- settings
The content of current settingsreturned: when rc is 0 and the section is ‘dump’type: dictsample:{"log_config": {"log_dir": "/var/log", "log_file": "ibmi_ansible_modules.log", "log_level": "DEBUG", "max_log_size_mb": 5, "no_log": false}, "time": "2020-06-28 22:01:57.881370"}