ansible-fetch-logs
Fetch and analyze log files from remote hosts using Ansible. Filter by regex pattern and limit lines for efficient troubleshooting.
Instructions
Fetch and analyze log files from remote hosts.
Args: host_pattern: Target hosts pattern log_paths: List of log file paths to fetch project_root: Project root directory ansible_cfg_path: Ansible config file path inventory_paths: Inventory file paths lines: Number of lines to fetch (like tail -n) filter_pattern: Regex pattern to filter log lines analyze: Perform log pattern analysis
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | ||
| analyze | No | ||
| log_paths | Yes | ||
| host_pattern | Yes | ||
| project_root | No | ||
| filter_pattern | No | ||
| inventory_paths | No | ||
| ansible_cfg_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||