
Kolla's default heka pipline may not satisfy user's requirements, for example, sending openstack log to outer log analyze system. So it is necessary to add heka custom configuration for define user's encoders, outputs and other plugins. Change-Id: I48bd8d7e0afbc2d023c49c83041f87a04970bbb6 Closes-Bug: #1611164
84 lines
3.2 KiB
YAML
84 lines
3.2 KiB
YAML
---
|
|
- name: Ensuring config directories exist
|
|
file:
|
|
path: "{{ node_config_directory }}/{{ item }}"
|
|
state: "directory"
|
|
recurse: yes
|
|
with_items:
|
|
- "heka"
|
|
- "cron"
|
|
- "cron/logrotate"
|
|
|
|
- name: Copying over config.json files for services
|
|
template:
|
|
src: "{{ item }}.json.j2"
|
|
dest: "{{ node_config_directory }}/{{ item }}/config.json"
|
|
with_items:
|
|
- "heka"
|
|
- "cron"
|
|
|
|
- name: Copying over heka config files
|
|
template:
|
|
src: "heka-{{ item.src|default(item.name) }}.toml.j2"
|
|
dest: "{{ node_config_directory }}/heka/heka-{{ item.name }}.toml"
|
|
when: item.enabled | bool
|
|
with_items:
|
|
- { name: "elasticsearch", enabled: "{{ enable_central_logging }}" }
|
|
- { name: "global", enabled: "yes" }
|
|
- { name: "haproxy", enabled: "{{ enable_haproxy }}" }
|
|
- { name: "horizon", enabled: "{{ enable_horizon }}" }
|
|
- { name: "keepalived", enabled: "{{ enable_haproxy }}" }
|
|
- { name: "keystone", enabled: "{{ enable_keystone }}" }
|
|
- { name: "mariadb", enabled: "{{ enable_mariadb }}" }
|
|
- { name: "openstack", enabled: "yes" }
|
|
- { name: "rabbitmq", enabled: "{{ enable_rabbitmq }}" }
|
|
- { name: "swift-account-auditor", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-account-reaper", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-account-replicator", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-account-server", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-container-auditor", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-container-replicator", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-container-server", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-container-updater", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-object-auditor", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-object-expirer", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-object-replicator", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-object-server", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-object-updater", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-proxy-server", src: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "swift-rsyncd", src: "swift", enabled: "{{ enable_swift }}" }
|
|
|
|
- name: Heka custom config file exists
|
|
stat: "path={{ node_custom_config }}/heka/heka-custom.toml"
|
|
register: heka_custom_stat_result
|
|
|
|
- name: Copying over heka custom config file
|
|
template:
|
|
src: "{{ node_custom_config }}/heka/heka-custom.toml"
|
|
dest: "{{ node_config_directory }}/heka/heka-custom.toml"
|
|
when: heka_custom_stat_result.stat.exists == true
|
|
|
|
- name: Copying over cron logrotate config files
|
|
template:
|
|
src: "cron-logrotate-{{ item }}.conf.j2"
|
|
dest: "{{ node_config_directory }}/cron/logrotate/{{ item }}.conf"
|
|
with_items:
|
|
- "ansible"
|
|
- "cinder"
|
|
- "glance"
|
|
- "global"
|
|
- "haproxy"
|
|
- "heat"
|
|
- "keepalived"
|
|
- "keystone"
|
|
- "magnum"
|
|
- "manila"
|
|
- "mariadb"
|
|
- "mistral"
|
|
- "murano"
|
|
- "neutron"
|
|
- "nova"
|
|
- "rabbitmq"
|
|
- "swift"
|
|
- "watcher"
|