test
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
dvirlabs 2026-04-17 18:43:19 +03:00
parent 10caf2538a
commit e7a7bcee4b
2 changed files with 31 additions and 9 deletions

View File

@ -77,9 +77,22 @@
- name: Print validation error output
debug:
msg: |
✗ Validation failed!
stdout: {{ validation_result.stdout | default('(empty)') }}
stderr: {{ validation_result.stderr | default('(empty)') }}
##################################################
❌ RSYSLOG VALIDATION FAILED
##################################################
HOST : {{ inventory_hostname }} ({{ ansible_host }})
RC : {{ validation_result.rc }}
--- STDOUT ----------------------------------
{{ validation_result.stdout | default('(empty)') }}
--- STDERR ----------------------------------
{{ validation_result.stderr | default('(empty)') }}
##################################################
⚠ Rolling back to previous working configuration
##################################################
when: validation_result.rc != 0
- name: Restore rsyslog.conf from backup
@ -99,10 +112,15 @@
- name: Fail pipeline — config restored to previous working state
fail:
msg: >
rsyslog configuration validation failed (rc={{ validation_result.rc }}).
The previous working config has been restored. No service restart was performed.
msg: |
##################################################
❌ PIPELINE FAILED — rsyslog validation error
##################################################
Previous working config has been restored.
rsyslog was NOT restarted.
rc={{ validation_result.rc }}
stderr: {{ validation_result.stderr | default('(empty)') }}
##################################################
when: validation_result.rc != 0
# -------------------------------------------------------------------------
@ -118,6 +136,10 @@
- name: Print success status
debug:
msg: |
✓ rsyslog configuration deployed successfully.
Validation passed. Service restarted.
##################################################
✅ RSYSLOG CONFIGURATION DEPLOYED SUCCESSFULLY
##################################################
HOST : {{ inventory_hostname }} ({{ ansible_host }})
STATUS : Validation passed. Service restarted.
##################################################
when: validation_result.rc == 0

View File

@ -30,7 +30,7 @@ module(load="imklog" permitnonkernelfacility="on")
# Use traditional timestamp format.
# To enable high precision timestamps, comment out the following line.
#
this is a test#################################
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
# Filter duplicated messages