sap / sap.sap_operations / 1.25.0 / module / proc_info Reads content from files in the /proc directory | "added in version" 1.18.0 of sap.sap_operations" Authors: Kirill Satarin (@kksat)sap.sap_operations.proc_info (1.25.0) — module
Install with ansible-galaxy collection install sap.sap_operations:==1.25.0
collections: - name: sap.sap_operations version: 1.25.0
This module is designed to read the contents of files located within the /proc directory.
It prevents directory traversal attacks by ensuring that the requested path is within the /proc directory.
- name: Read cpuinfo sap.sap_operations.proc_info: proc: "cpuinfo"
- name: Try to read outside /proc sap.sap_operations.proc_info: proc: "/etc/passwd"
proc: description: - The path to the file within the /proc directory to read. - This path might be relative to the /proc directory or absolute; absolute paths are adjusted accordingly. - To read /proc/cpuinfo from the root directory, one should set this parameter to "/proc/cpuinfo" or "cpuinfo" required: true type: path
proc_path: description: The absolute path to the file that was read. returned: always type: str rc: description: Return code from the 'cat' command. returned: always type: int stderr: description: The standard error from the 'cat' command if it fails. returned: failure type: str stdout: description: The content of the file read from /proc. returned: success type: str