8b5b3cef4e
* "bool" filter is removed when not required * 'not' is used instead of '== False' check Change-Id: I85a5bb9a5ea874ac1c397cbf8de416147d2424c3
164 lines
6.0 KiB
YAML
164 lines
6.0 KiB
YAML
---
|
|
- name: Ensuring config directories exist
|
|
file:
|
|
path: "{{ node_config_directory }}/{{ item }}"
|
|
state: "directory"
|
|
recurse: yes
|
|
with_items:
|
|
- "fluentd"
|
|
- "fluentd/input"
|
|
- "fluentd/output"
|
|
- "fluentd/format"
|
|
- "fluentd/filter"
|
|
- "kolla-toolbox"
|
|
- "cron"
|
|
- "cron/logrotate"
|
|
|
|
- name: Copying over config.json files for services
|
|
template:
|
|
src: "{{ item.key }}.json.j2"
|
|
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
|
|
register: common_config_jsons
|
|
with_dict: "{{ common_services }}"
|
|
notify:
|
|
- "Restart {{ item.key }} container"
|
|
|
|
- name: Copying over fluentd input config files
|
|
template:
|
|
src: "conf/input/{{ item }}.conf.j2"
|
|
dest: "{{ node_config_directory }}/fluentd/input/{{ item }}.conf"
|
|
register: fluentd_input
|
|
with_items:
|
|
- "00-global"
|
|
- "01-syslog"
|
|
- "02-mariadb"
|
|
- "03-rabbitmq"
|
|
notify:
|
|
- Restart fluentd container
|
|
|
|
- name: Copying over fluentd output config files
|
|
template:
|
|
src: "conf/output/{{ item.name }}.conf.j2"
|
|
dest: "{{ node_config_directory }}/fluentd/output/{{ item.name }}.conf"
|
|
register: fluentd_output
|
|
when: item.enabled | bool
|
|
with_items:
|
|
- name: "00-local"
|
|
enabled: true
|
|
- name: "01-es"
|
|
enabled: "{{ enable_elasticsearch | bool or
|
|
( elasticsearch_address != kolla_internal_vip_address ) }}"
|
|
notify:
|
|
- Restart fluentd container
|
|
|
|
- name: Copying over fluentd format config files
|
|
template:
|
|
src: "conf/format/{{ item }}.conf.j2"
|
|
dest: "{{ node_config_directory }}/fluentd/format/{{ item }}.conf"
|
|
register: fluentd_format
|
|
with_items:
|
|
- "apache_access"
|
|
- "wsgi_access"
|
|
- "wsgi_python"
|
|
notify:
|
|
- Restart fluentd container
|
|
|
|
- name: Copying over fluentd filter config files
|
|
template:
|
|
src: "conf/filter/{{ item }}.conf.j2"
|
|
dest: "{{ node_config_directory }}/fluentd/filter/{{ item }}.conf"
|
|
register: fluentd_filter
|
|
with_items:
|
|
- "00-record_transformer"
|
|
- "01-rewrite"
|
|
notify:
|
|
- Restart fluentd container
|
|
|
|
- name: Copying over td-agent.conf
|
|
template:
|
|
src: "td-agent.conf.j2"
|
|
dest: "{{ node_config_directory }}/{{ item }}/td-agent.conf"
|
|
register: fluentd_td_agent
|
|
with_items:
|
|
- "fluentd"
|
|
notify:
|
|
- Restart fluentd container
|
|
|
|
- name: Copying over cron logrotate config files
|
|
template:
|
|
src: "cron-logrotate-{{ item.name }}.conf.j2"
|
|
dest: "{{ node_config_directory }}/cron/logrotate/{{ item.name }}.conf"
|
|
register: cron_confs
|
|
when: item.enabled | bool
|
|
with_items:
|
|
- { name: "ansible", enabled: "yes" }
|
|
- { name: "aodh", enabled: "{{ enable_aodh }}" }
|
|
- { name: "barbican", enabled: "{{ enable_barbican }}" }
|
|
- { name: "ceilometer", enabled: "{{ enable_ceilometer }}" }
|
|
- { name: "ceph", enabled: "{{ enable_ceph }}" }
|
|
- { name: "chrony", enabled: "{{ enable_chrony }}" }
|
|
- { name: "cinder", enabled: "{{ enable_cinder }}" }
|
|
- { name: "cloudkitty", enabled: "{{ enable_cloudkitty }}" }
|
|
- { name: "collectd", enabled: "{{ enable_collectd }}" }
|
|
- { name: "congress", enabled: "{{ enable_congress }}" }
|
|
- { name: "designate", enabled: "{{ enable_designate }}" }
|
|
- { name: "elasticsearch", enabled: "{{ enable_elasticsearch }}" }
|
|
- { name: "etcd", enabled: "{{ enable_etcd }}" }
|
|
- { name: "freezer", enabled: "{{ enable_freezer }}" }
|
|
- { name: "glance", enabled: "{{ enable_glance }}" }
|
|
- { name: "global", enabled: "yes" }
|
|
- { name: "gnocchi", enabled: "{{ enable_gnocchi }}" }
|
|
- { name: "grafana", enabled: "{{ enable_grafana }}" }
|
|
- { name: "haproxy", enabled: "{{ enable_haproxy }}" }
|
|
- { name: "heat", enabled: "{{ enable_heat }}" }
|
|
- { name: "influxdb", enabled: "{{ enable_influxdb }}" }
|
|
- { name: "ironic", enabled: "{{ enable_ironic }}" }
|
|
- { name: "ironic-inspector", enabled: "{{ enable_ironic }}" }
|
|
- { name: "iscsid", enabled: "{{ enable_iscsid }}" }
|
|
- { name: "karbor", enabled: "{{ enable_karbor }}" }
|
|
- { name: "keepalived", enabled: "{{ enable_haproxy }}" }
|
|
- { name: "keystone", enabled: "{{ enable_keystone }}" }
|
|
- { name: "kibana", enabled: "{{ enable_kibana }}" }
|
|
- { name: "kuryr", enabled: "{{ enable_kuryr }}" }
|
|
- { name: "magnum", enabled: "{{ enable_magnum }}" }
|
|
- { name: "manila", enabled: "{{ enable_manila }}" }
|
|
- { name: "mariadb", enabled: "{{ enable_mariadb }}" }
|
|
- { name: "mistral", enabled: "{{ enable_mistral }}" }
|
|
- { name: "mongodb", enabled: "{{ enable_mongodb }}" }
|
|
- { name: "murano", enabled: "{{ enable_murano }}" }
|
|
- { name: "neutron", enabled: "{{ enable_neutron }}" }
|
|
- { name: "nova", enabled: "{{ enable_nova }}" }
|
|
- { name: "octavia", enabled: "{{ enable_octavia }}" }
|
|
- { name: "outward-rabbitmq", enabled: "{{ enable_outward_rabbitmq }}" }
|
|
- { name: "panko", enabled: "{{ enable_panko }}" }
|
|
- { name: "rabbitmq", enabled: "{{ enable_rabbitmq }}" }
|
|
- { name: "rally", enabled: "{{ enable_rally }}" }
|
|
- { name: "sahara", enabled: "{{ enable_sahara }}" }
|
|
- { name: "searchlight", enabled: "{{ enable_searchlight }}" }
|
|
- { name: "senlin", enabled: "{{ enable_senlin }}" }
|
|
- { name: "solum", enabled: "{{ enable_solum }}" }
|
|
- { name: "swift", enabled: "{{ enable_swift }}" }
|
|
- { name: "tacker", enabled: "{{ enable_tacker }}" }
|
|
- { name: "tempest", enabled: "{{ enable_tempest }}" }
|
|
- { name: "trove", enabled: "{{ enable_trove }}" }
|
|
- { name: "watcher", enabled: "{{ enable_watcher }}" }
|
|
- { name: "zun", enabled: "{{ enable_zun }}" }
|
|
notify:
|
|
- Restart cron container
|
|
|
|
- name: Check common containers
|
|
kolla_docker:
|
|
action: "compare_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ item.value.container_name }}"
|
|
image: "{{ item.value.image }}"
|
|
volumes: "{{ item.value.volumes }}"
|
|
privileged: "{{ item.value.privileged | default(False) }}"
|
|
environment: "{{ item.value.environment }}"
|
|
register: check_common_containers
|
|
when:
|
|
- action != "config"
|
|
with_dict: "{{ common_services }}"
|
|
notify:
|
|
- "Restart {{ item.key }} container"
|