diff --git a/ansible/roles/iscsi/tasks/config.yml b/ansible/roles/iscsi/tasks/config.yml index 4393db15f5..0ebe3dd745 100644 --- a/ansible/roles/iscsi/tasks/config.yml +++ b/ansible/roles/iscsi/tasks/config.yml @@ -23,7 +23,9 @@ path: "{{ node_config_directory }}/{{ item }}" state: "directory" recurse: yes - when: inventory_hostname in groups['tgtd'] + when: + - inventory_hostname in groups['tgtd'] + - enable_cinder_backend_lvm | bool with_items: - "tgtd" @@ -31,6 +33,8 @@ template: src: "{{ item }}.json.j2" dest: "{{ node_config_directory }}/{{ item }}/config.json" - when: inventory_hostname in groups['tgtd'] + when: + - inventory_hostname in groups['tgtd'] + - enable_cinder_backend_lvm | bool with_items: - "tgtd"