Load iSCSI data only in an iSCSI setup
Change-Id: Icb369b621c4ef9490d5314b200bd328932b8b7b9
diff --git a/playbooks/setup-openstack-storpool/pre.yaml b/playbooks/setup-openstack-storpool/pre.yaml
index 9da5540..ec32ab8 100644
--- a/playbooks/setup-openstack-storpool/pre.yaml
+++ b/playbooks/setup-openstack-storpool/pre.yaml
@@ -103,7 +103,7 @@
- "{{ openstack_node }}"
- "{{ port_node_2_sp_api }}"
- - name: Attach the StorPool Ports to the Block Client StorPool Node
+ - name: Attach the StorPool Ports to the Block Client OpenStack Node
ansible.builtin.command:
argv:
- "{{ os_venv }}/bin/openstack"
@@ -205,26 +205,36 @@
- vars.yaml
tasks:
- name: Create a Temporary Directory
- ansible.builtin.tempfile:
- state: directory
- prefix: multipath-iscsi-storpool.
- register: tmpdir
+ block:
- - set_fact:
- tmpdir: "{{ tmpdir.path }}"
+ - name: Create a Temporary Directory
+ ansible.builtin.tempfile:
+ state: directory
+ prefix: multipath-iscsi-storpool.
+ register: tmpdir
+
+ - set_fact:
+ tmpdir: "{{ tmpdir.path }}"
+
+ when: storpool_connection == "iscsi"
- hosts: undercloud-client
vars_files:
- vars.yaml
tasks:
- - name: Download Required Information from Previous Stage to Ansible Controller
- ansible.builtin.fetch:
- src: "~/ansivars.yaml"
- dest: "{{ hostvars.localhost.tmpdir }}"
+ - name: Required Information from Previous Stage
+ block:
- - name: Load Required Information from Previous Stage
- ansible.builtin.include_vars:
- file: "{{ hostvars.localhost.tmpdir }}/undercloud-client/home/ubuntu/ansivars.yaml"
+ - name: Download Required Information from Previous Stage to Ansible Controller
+ ansible.builtin.fetch:
+ src: "~/ansivars.yaml"
+ dest: "{{ hostvars.localhost.tmpdir }}"
+
+ - name: Load Required Information from Previous Stage
+ ansible.builtin.include_vars:
+ file: "{{ hostvars.localhost.tmpdir }}/undercloud-client/home/ubuntu/ansivars.yaml"
+
+ when: storpool_connection == "iscsi"
- hosts: lab-sp-a1
vars_files: