Skip to content

Commit

Permalink
style: rsyslog_logfiles_attributes_modify/ansible: split long line
Browse files Browse the repository at this point in the history
  • Loading branch information
maage committed Mar 21, 2023
1 parent 686284b commit 7ec9cee
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@
- name: '{{{ rule_title }}} - Extract log files new format'
ansible.builtin.shell: |
set -o pipefail
grep -ozP "action\s*\(\s*type\s*=\s*\"omfile\"[^\)]*\)" {{ item }} | grep -aoP "File\s*=\s*\"([/[:alnum:][:punct:]]*)\"\s*\)"|grep -oE "\"([/[:alnum:][:punct:]]*)\"" |tr -d "\""|| true
grep -ozP "action\s*\(\s*type\s*=\s*\"omfile\"[^\)]*\)" {{ item }} | \
grep -aoP "File\s*=\s*\"([/[:alnum:][:punct:]]*)\"\s*\)" | \
grep -oE "\"([/[:alnum:][:punct:]]*)\"" | \
tr -d "\"" || true
loop: "{{ rsyslog_config_files.files|map(attribute='path')|list|flatten|unique + [ rsyslog_etc_config ] }}"
register: log_files_new
changed_when: False
Expand Down

0 comments on commit 7ec9cee

Please sign in to comment.