An Ansible role for aggregating logs from different nodes.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

47 lines
1.6 KiB

---
- block:
- name: Load sova patterns from URL
uri:
url: https://opendev.org/openstack/tripleo-ci-health-queries/raw/branch/master/output/sova-pattern-generated.json
method: GET
return_content: true
status_code: 200
body_format: json
retries: 3 # to avoid accidental failures due to networking or rate limiting
delay: 60
register: pattern_config
- name: Set sova_config from URL content
set_fact:
sova_config: "{{ pattern_config.json }}"
when: sova_config_file is not defined
- block:
- name: Load sova patterns from local file
command: cat "{{ sova_config_file }}"
register: sova_config_file_output
- name: Set sova_config from local file
set_fact:
sova_config: "{{ sova_config_file_output.stdout | from_json }}"
when: sova_config_file is defined
- name: Run sova task
sova:
config: "{{ sova_config }}"
files:
console: "{{ ansible_user_dir }}/workspace/logs/quickstart_install.log"
errors: "/var/log/errors.txt"
"ironic-conductor": "/var/log/containers/ironic/ironic-conductor.log"
syslog: "/var/log/journal.txt"
logstash: "/var/log/extra/logstash.txt"
registry_log: "/var/log/extra/podman/containers/docker_registry/stdout.log"
result: "{{ ansible_user_dir }}/workspace/logs/failures_file"
result_file_dir: "{{ ansible_user_dir }}/workspace/logs"
- name: Run sova task (denials)
sova:
config: "{{ sova_config }}"
files:
selinux: "/var/log/extra/denials.txt"
result: "{{ ansible_user_dir }}/workspace/logs/selinux_denials.log"