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 - name: Print validation error output
debug: debug:
msg: | msg: |
✗ Validation failed! ##################################################
stdout: {{ validation_result.stdout | default('(empty)') }} ❌ RSYSLOG VALIDATION FAILED
stderr: {{ validation_result.stderr | default('(empty)') }} ##################################################
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 when: validation_result.rc != 0
- name: Restore rsyslog.conf from backup - name: Restore rsyslog.conf from backup
@ -99,10 +112,15 @@
- name: Fail pipeline — config restored to previous working state - name: Fail pipeline — config restored to previous working state
fail: fail:
msg: > msg: |
rsyslog configuration validation failed (rc={{ validation_result.rc }}). ##################################################
The previous working config has been restored. No service restart was performed. ❌ 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)') }} stderr: {{ validation_result.stderr | default('(empty)') }}
##################################################
when: validation_result.rc != 0 when: validation_result.rc != 0
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
@ -118,6 +136,10 @@
- name: Print success status - name: Print success status
debug: debug:
msg: | 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 when: validation_result.rc == 0

View File

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