
CephAdm, Octavia, OVN and NFV jobs are not added here, because these rely on Valkey/Redis available. Ironic jobs are not added, because ipxe.efi is not packaged in EL10 and needs a followup patch. Let's Encrypt jobs are also not added, due to ssl certificate validation errors. Depends-On: https://review.opendev.org/c/openstack/kolla/+/956554 Depends-On: https://review.opendev.org/c/openstack/ansible-collection-kolla/+/961237 Change-Id: I51823808c4e4ac08ae8f080aacf6a3759589571d Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
141 lines
5.1 KiB
YAML
141 lines
5.1 KiB
YAML
---
|
|
- name: Ensuring config directories exist
|
|
vars:
|
|
service_name: "fluentd"
|
|
service: "{{ fluentd_services[service_name] }}"
|
|
file:
|
|
path: "{{ node_config_directory }}/{{ service_name }}"
|
|
state: "directory"
|
|
owner: "{{ config_owner_user }}"
|
|
group: "{{ config_owner_group }}"
|
|
mode: "0770"
|
|
become: true
|
|
when: service | service_enabled_and_mapped_to_host
|
|
|
|
- include_tasks: copy-certs.yml
|
|
when:
|
|
- kolla_copy_ca_into_containers | bool
|
|
|
|
- name: Ensure /var/log/journal exists on EL systems
|
|
become: true
|
|
file:
|
|
path: /var/log/journal
|
|
state: directory
|
|
owner: root
|
|
group: systemd-journal
|
|
mode: "2755"
|
|
when: kolla_base_distro in ['centos', 'rocky']
|
|
|
|
- name: Copying over config.json files for services
|
|
template:
|
|
src: "{{ item.key }}.json.j2"
|
|
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
|
|
mode: "0660"
|
|
become: true
|
|
with_dict: "{{ fluentd_services | select_services_enabled_and_mapped_to_host }}"
|
|
|
|
- name: Find custom fluentd input config files
|
|
find:
|
|
path: "{{ node_custom_config }}/fluentd/input"
|
|
pattern: "*.conf"
|
|
run_once: True
|
|
register: find_custom_fluentd_inputs
|
|
delegate_to: localhost
|
|
|
|
- name: Find custom fluentd filter config files
|
|
find:
|
|
path: "{{ node_custom_config }}/fluentd/filter"
|
|
pattern: "*.conf"
|
|
run_once: True
|
|
register: find_custom_fluentd_filters
|
|
delegate_to: localhost
|
|
|
|
- name: Find custom fluentd format config files
|
|
find:
|
|
path: "{{ node_custom_config }}/fluentd/format"
|
|
pattern: "*.conf"
|
|
run_once: True
|
|
register: find_custom_fluentd_formats
|
|
delegate_to: localhost
|
|
|
|
- name: Find custom fluentd output config files
|
|
find:
|
|
path: "{{ node_custom_config }}/fluentd/output"
|
|
pattern: "*.conf"
|
|
run_once: True
|
|
register: find_custom_fluentd_outputs
|
|
delegate_to: localhost
|
|
|
|
- name: Copying over fluentd.conf
|
|
vars:
|
|
log_direct_to_elasticsearch: "{{ elasticsearch_address is defined }}"
|
|
log_direct_to_opensearch: >-
|
|
{{ enable_opensearch | bool or
|
|
( opensearch_address != kolla_internal_fqdn ) }}
|
|
# Inputs
|
|
fluentd_input_files: "{{ default_input_files_enabled | customise_fluentd(customised_input_files) }}"
|
|
default_input_files_enabled: "{{ default_input_files | selectattr('enabled') | map(attribute='name') | list }}"
|
|
default_input_files:
|
|
- name: "conf/input/00-global.conf.j2"
|
|
enabled: true
|
|
- name: "conf/input/01-syslog.conf.j2"
|
|
enabled: true
|
|
- name: "conf/input/02-mariadb.conf.j2"
|
|
enabled: true
|
|
- name: "conf/input/03-rabbitmq.conf.j2"
|
|
enabled: true
|
|
- name: "conf/input/04-openstack-wsgi.conf.j2"
|
|
enabled: true
|
|
- name: "conf/input/05-libvirt.conf.j2"
|
|
enabled: "{{ enable_nova | bool and enable_nova_libvirt_container | bool }}"
|
|
- name: "conf/input/08-prometheus.conf.j2"
|
|
enabled: "{{ enable_prometheus_fluentd_integration | bool }}"
|
|
- name: "conf/input/10-openvswitch.conf.j2"
|
|
enabled: true
|
|
- name: "conf/input/11-letsencrypt.conf.j2"
|
|
enabled: "{{ enable_letsencrypt | bool }}"
|
|
- name: "conf/input/12-systemd.conf.j2"
|
|
enabled: "{{ enable_fluentd_systemd | bool }}"
|
|
- name: "conf/input/13-uwsgi.conf.j2"
|
|
enabled: true
|
|
customised_input_files: "{{ find_custom_fluentd_inputs.files | map(attribute='path') | list }}"
|
|
# Filters
|
|
fluentd_filter_files: "{{ default_filter_files | customise_fluentd(customised_filter_files) }}"
|
|
default_filter_files:
|
|
- "conf/filter/00-record_transformer.conf.j2"
|
|
- "conf/filter/01-rewrite.conf.j2"
|
|
- "conf/filter/02-parser.conf.j2"
|
|
customised_filter_files: "{{ find_custom_fluentd_filters.files | map(attribute='path') | list }}"
|
|
# Formats
|
|
fluentd_format_files: "{{ default_format_files | customise_fluentd(customised_format_files) }}"
|
|
default_format_files:
|
|
- "conf/format/apache_access.conf.j2"
|
|
- "conf/format/wsgi_access.conf.j2"
|
|
customised_format_files: "{{ find_custom_fluentd_formats.files | map(attribute='path') | list }}"
|
|
# Outputs
|
|
fluentd_output_files: "{{ default_output_files_enabled | customise_fluentd(customised_output_files) }}"
|
|
default_output_files_enabled: "{{ default_output_files | selectattr('enabled') | map(attribute='name') | list }}"
|
|
default_output_files:
|
|
- name: "conf/output/00-local.conf.j2"
|
|
enabled: true
|
|
- name: "conf/output/01-es.conf.j2"
|
|
enabled: "{{ log_direct_to_elasticsearch }}"
|
|
- name: "conf/output/03-opensearch.conf.j2"
|
|
enabled: "{{ log_direct_to_opensearch }}"
|
|
customised_output_files: "{{ find_custom_fluentd_outputs.files | map(attribute='path') | list }}"
|
|
template:
|
|
src: "fluentd.conf.j2"
|
|
dest: "{{ node_config_directory }}/fluentd/fluentd.conf"
|
|
mode: "0660"
|
|
become: true
|
|
|
|
- name: Ensuring config directories have correct owner and permission
|
|
become: true
|
|
file:
|
|
path: "{{ node_config_directory }}/{{ item.key }}"
|
|
owner: "{{ config_owner_user }}"
|
|
group: "{{ config_owner_group }}"
|
|
mode: "0770"
|
|
ignore_errors: "{{ ansible_check_mode }}"
|
|
with_dict: "{{ fluentd_services | select_services_enabled_and_mapped_to_host }}"
|