2016-03-31 10:33:55 -04:00
|
|
|
---
|
|
|
|
- name: Ensuring config directories exist
|
|
|
|
file:
|
2018-05-19 23:19:53 +00:00
|
|
|
path: "{{ node_config_directory }}/{{ item.key }}"
|
2016-03-31 10:33:55 -04:00
|
|
|
state: "directory"
|
2016-08-24 00:28:08 +07:00
|
|
|
owner: "{{ config_owner_user }}"
|
|
|
|
group: "{{ config_owner_group }}"
|
|
|
|
mode: "0770"
|
|
|
|
become: true
|
2018-05-19 23:19:53 +00:00
|
|
|
when:
|
|
|
|
- inventory_hostname in groups[item.value.group]
|
|
|
|
- item.value.enabled | bool
|
|
|
|
with_dict: "{{ iscsi_services }}"
|
2016-03-31 10:33:55 -04:00
|
|
|
|
|
|
|
- name: Copying over config.json files for services
|
|
|
|
template:
|
2018-05-19 23:19:53 +00: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
|
2016-10-04 08:04:57 -07:00
|
|
|
when:
|
2018-05-19 23:19:53 +00:00
|
|
|
- inventory_hostname in groups[item.value.group]
|
|
|
|
- item.value.enabled | bool
|
|
|
|
with_dict: "{{ iscsi_services }}"
|
|
|
|
notify:
|
|
|
|
- "Restart {{ item.key }} container"
|