3bd180f857
Only enabled services logs should be added to cron container and be inclued in cron.json. This PS adds logic to only copy enabled services cron files. Change-Id: Id6303a4c77a0230599e11be165489ba46dba65e0 Closes-bug: #1623712
95 lines
4.4 KiB
YAML
95 lines
4.4 KiB
YAML
---
|
|
- name: Ensuring config directories exist
|
|
file:
|
|
path: "{{ node_config_directory }}/{{ item }}"
|
|
state: "directory"
|
|
recurse: yes
|
|
with_items:
|
|
- "heka"
|
|
- "kolla-toolbox"
|
|
- "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"
|
|
- "kolla-toolbox"
|
|
- "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: "aodh", enabled: "{{ enable_aodh }}" }
|
|
- { name: "barbican", enabled: "{{ enable_barbican }}"}
|
|
- { name: "elasticsearch", enabled: "{{ enable_central_logging }}" }
|
|
- { name: "global", enabled: "yes" }
|
|
- { name: "gnocchi", enabled: "{{ enable_gnocchi }}" }
|
|
- { 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.name }}.conf.j2"
|
|
dest: "{{ node_config_directory }}/cron/logrotate/{{ item.name }}.conf"
|
|
when: item.enabled | bool
|
|
with_items:
|
|
- { name: "ansible", enabled: "yes" }
|
|
- { name: "aodh", enabled: "{{ enable_aodh }}" }
|
|
- { name: "barbican", enabled: "{{ enable_barbican }}" }
|
|
- { name: "cinder", enabled: "{{ enable_cinder }}" }
|
|
- { name: "cloudkitty", enabled: "{{ enable_cloudkitty }}" }
|
|
- { name: "glance", enabled: "{{ enable_glance }}" }
|
|
- { name: "global", enabled: "yes" }
|
|
- { name: "gnocchi", enabled: "{{ enable_gnocchi }}" }
|
|
- { name: "haproxy", enabled: "{{ enable_haproxy }}" }
|
|
- { name: "heat", enabled: "{{ enable_heat }}" }
|
|
- { name: "keepalived", enabled: "{{ enable_haproxy }}" }
|
|
- { name: "keystone", enabled: "{{ enable_keystone }}" }
|
|
- { name: "magnum", enabled: "{{ enable_magnum }}" }
|
|
- { name: "manila", enabled: "{{ enable_manila }}" }
|
|
- { name: "mariadb", enabled: "{{ enable_mariadb }}" }
|
|
- { name: "mistral", enabled: "{{ enable_mistral }}" }
|
|
- { name: "murano", enabled: "{{ enable_murano }}" }
|
|
- { name: "neutron", enabled: "{{ enable_neutron }}" }
|
|
- { name: "nova", enabled: "{{ enable_nova }}" }
|
|
- { name: "rabbitmq", enabled: "{{ enable_rabbitmq }}" }
|
|
- { name: "senlin", enabled: "{{ enable_senlin }}" }
|
|
- { name: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "watcher", enabled: "{{ enable_watcher }}" }
|