aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/iscsi/tasks/config.yml
blob: 0ebe3dd7454c17ca49c9d452c1bc178191e17038 (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
38
39
40
---
- name: Ensuring config directories exist
  file:
    path: "{{ node_config_directory }}/{{ item }}"
    state: "directory"
    recurse: yes
  when: inventory_hostname in groups['compute'] or
        inventory_hostname in groups['storage']
  with_items:
    - "iscsid"

- name: Copying over config.json files for services
  template:
    src: "{{ item }}.json.j2"
    dest: "{{ node_config_directory }}/{{ item }}/config.json"
  when: inventory_hostname in groups['compute'] or
        inventory_hostname in groups['storage']
  with_items:
    - "iscsid"

- name: Ensuring config directories exist
  file:
    path: "{{ node_config_directory }}/{{ item }}"
    state: "directory"
    recurse: yes
  when:
    - inventory_hostname in groups['tgtd']
    - enable_cinder_backend_lvm | bool
  with_items:
    - "tgtd"

- name: Copying over config.json files for services
  template:
    src: "{{ item }}.json.j2"
    dest: "{{ node_config_directory }}/{{ item }}/config.json"
  when:
    - inventory_hostname in groups['tgtd']
    - enable_cinder_backend_lvm | bool
  with_items:
    - "tgtd"