- Add debug output showing rsyslogd_check.diff structure
- Simplify file extraction logic for rsyslog.d directory changes
- Show full JSON payload before sending to API
- Add connectivity test to gitops-status-server before POST
- Show curl command and response codes for debugging
- Display warning if OUT_OF_SYNC but no files extracted
This helps diagnose why drift is detected but files aren't listed in the JSON.
Root causes:
1. Inconsistent Ansible callback (minimal) broke debug output parsing
2. DRIFTED_FILES extraction failed due to format changes
3. Files array stayed empty even when drift was detected
Fixes:
1. Use YAML callback for consistent, structured output
2. Improve DRIFTED_FILES parsing to handle YAML format
3. Remove conflicting ANSIBLE_CALLBACKS_ENABLED/minimal settings
4. Add GITOPS_STATUS_FIX.md with complete analysis
Result:
- Files array now populates correctly when drift exists
- Sync status accurately reflects actual server state
- Better debug logging for troubleshooting
See GITOPS_STATUS_FIX.md for full root cause analysis and testing guide.
- Capture and display full curl response body for debugging
- Add verification step to confirm JSON was stored on server
- Improve error messages with connectivity troubleshooting hints