-
-
Save onlyanegg/bb758a63f9ce232911b422801e10628e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cie: | |
config: | |
kafka: | |
zookepperUrl: 'localhost:2181' | |
brokers: 'localhost:9092' | |
services: | |
account: | |
description: Account Service | |
config_sections: | |
- kafka | |
- eureka | |
config: | |
eureka: | |
vipAddress: 'account' | |
kafka: | |
handlers: | |
- 'com.cie.account.handler.RegistrationImportFinishHandler' | |
- 'com.cie.account.handler.BulkAccountCreateHandler' | |
audit: | |
description: Audit Service | |
config_sections: | |
- eureka | |
config: | |
eureka: | |
vipAddress: 'audit' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- from 'cie/settings.sls' import cie with context -%} | |
{% for service, attributes in cie.services.iteritems() %} | |
{% set config = cie.config %} | |
{% for section in attributes.config_sections | default([]) %} | |
manage_{{ service }}_{{ section }}_configuration: | |
file.serialize: | |
- name: /usr/local/{{ service }}/etc/{{ service }}.yml | |
- dataset: {{ '{' ~ section ~ ': ' ~ salt.slsutil.update(config.get(section, {}), attributes.config.get(section, {})) ~ '}' }} | |
- formatter: yaml | |
- merge_if_exists: True | |
- user: {{ pillar.sys_users.cie.user }} | |
- group: {{ pillar.sys_users.cie.group }} | |
- mode: 640 | |
{% endfor %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment