aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/watcher/tasks/config.yml
blob: 5116c3ebb49ac8b64546cb70f282b32da5f7f0d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
- name: Ensuring config directories exist
  file:
    path: "{{ node_config_directory }}/{{ item }}"
    state: "directory"
    recurse: yes
  with_items:
    - "watcher-api"
    - "watcher-engine"
    - "watcher-applier"

- name: Copying over config.json files for services
  template:
    src: "{{ item }}.json.j2"
    dest: "{{ node_config_directory }}/{{ item }}/config.json"
  with_items:
    - "watcher-api"
    - "watcher-engine"
    - "watcher-applier"

- name: Copying over watcher.conf
  merge_configs:
    vars:
      service_name: "{{ item }}"
    sources:
      - "{{ role_path }}/templates/watcher.conf.j2"
      - "{{ node_config_directory }}/config/global.conf"
      - "{{ node_config_directory }}/config/database.conf"
      - "{{ node_config_directory }}/config/messaging.conf"
      - "{{ node_config_directory }}/config/watcher.conf"
      - "{{ node_config_directory }}/config/watcher/{{ item }}.conf"
      - "{{ node_config_directory }}/config/watcher/{{ inventory_hostname }}/watcher.conf"
    dest: "{{ node_config_directory }}/{{ item }}/watcher.conf"
  with_items:
    - "watcher-api"
    - "watcher-engine"
    - "watcher-applier"