file_report_content_head
Report the head of a file.
⚙️ Compatible targets: Linux
Parameters
Name | Documentation |
---|---|
path | File to report content from. This parameter is required. |
limit | Number of lines to report (default is 10). This parameter must match ^\d*$ .This parameter is optional. |
Outcome conditions
You need to replace ${path}
with its actual canonified value.
- ✅ Ok:
file_report_content_head_${path}_ok
- ☑️ Already compliant:
file_report_content_head_${path}_kept
- 🟨 Repaired:
file_report_content_head_${path}_repaired
- ☑️ Already compliant:
- ❌ Error:
file_report_content_head_${path}_error
Example
method: file_report_content_head
params:
limit: OPTIONAL_VALUE
path: VALUE
Documentation
Report the head of a file.
This method does nothing on the system, but only reports a partial content from a given file. This allows centralizing this information on the server, and avoid having to connect on each node to get this information.
NOTE: This method only works in "Full Compliance" reporting mode.
Parameters
Target
This is the file you want to report content from. The method will return an error if it does not exist.
Limit
The number of line to report.
Examples
# To get the 3 first line of /etc/hosts
file_report_content("/etc/hosts", "3");