kolla-ansible/ansible/roles/common/tasks/config.yml
caowei 4c2da9e6d1 Add karbor ansible role
Co-Authored-By: zhubingbing <zhubingbing10@gmail.com>
Co-Authored-By: zhangshuai <446077695@qq.com>
Co-Authored-By: Mauricio Lima <mauriciolimab@gmail.com>

Change-Id: I7aebe544e3495767d6389dbf220d633a98c137da
Partially-implements: bp karbor-ansible-role
2016-12-21 01:53:20 +08:00

110 lines
5.3 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: "ceilometer", enabled: "{{ enable_ceilometer }}" }
- { name: "elasticsearch", enabled: "{{ enable_elasticsearch }}" }
- { name: "global", enabled: "yes" }
- { name: "gnocchi", enabled: "{{ enable_gnocchi }}" }
- { name: "grafana", enabled: "{{ enable_grafana }}" }
- { 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: "panko", enabled: "{{ enable_panko }}" }
- { 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
local_action: 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: "ceilometer", enabled: "{{ enable_ceilometer }}" }
- { name: "cinder", enabled: "{{ enable_cinder }}" }
- { name: "cloudkitty", enabled: "{{ enable_cloudkitty }}" }
- { name: "designate", enabled: "{{ enable_designate }}" }
- { name: "elasticsearch", enabled: "{{ enable_elasticsearch }}" }
- { 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: "iscsid", enabled: "{{ enable_iscsid }}" }
- { name: "karbor", enabled: "{{ enable_karbor }}" }
- { 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: "octavia", enabled: "{{ enable_octavia }}" }
- { name: "panko", enabled: "{{ enable_panko }}" }
- { name: "rabbitmq", enabled: "{{ enable_rabbitmq }}" }
- { 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: "watcher", enabled: "{{ enable_watcher }}" }