2016-09-02 00:48:01 -04:00
|
|
|
---
|
|
|
|
- name: Ensuring config directories exist
|
|
|
|
file:
|
2017-01-23 11:39:45 -03:00
|
|
|
path: "{{ node_config_directory }}/{{ item.key }}"
|
2016-09-02 00:48:01 -04:00
|
|
|
state: "directory"
|
2016-08-24 00:28:08 +07:00
|
|
|
owner: "{{ config_owner_user }}"
|
|
|
|
group: "{{ config_owner_group }}"
|
|
|
|
mode: "0770"
|
|
|
|
become: true
|
2017-01-23 11:39:45 -03:00
|
|
|
when:
|
|
|
|
- item.value.enabled | bool
|
2018-09-04 18:51:27 +01:00
|
|
|
- inventory_hostname in groups[item.value.group]
|
2017-01-23 11:39:45 -03:00
|
|
|
with_dict: "{{ etcd_services }}"
|
2016-09-02 00:48:01 -04:00
|
|
|
|
|
|
|
- name: Copying over config.json files for services
|
|
|
|
template:
|
2017-01-23 11:39:45 -03:00
|
|
|
src: "{{ item.key }}.json.j2"
|
|
|
|
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
|
2016-08-24 00:28:08 +07:00
|
|
|
mode: "0660"
|
|
|
|
become: true
|
2017-01-23 11:39:45 -03:00
|
|
|
when:
|
|
|
|
- item.value.enabled | bool
|
2018-09-04 18:51:27 +01:00
|
|
|
- inventory_hostname in groups[item.value.group]
|
2017-01-23 11:39:45 -03:00
|
|
|
with_dict: "{{ etcd_services }}"
|
|
|
|
notify:
|
2019-03-26 09:56:29 +00:00
|
|
|
- Restart {{ item.key }} container
|
2017-01-23 11:39:45 -03:00
|
|
|
|
2020-06-29 14:10:58 -07:00
|
|
|
- include_tasks: copy-certs.yml
|
|
|
|
when:
|
|
|
|
- etcd_enable_tls | bool
|