From 500ca210467d6d709fb0e537e52143c47f080020 Mon Sep 17 00:00:00 2001
From: Derek Higgins <derekh@redhat.com>
Date: Thu, 7 Jun 2018 10:11:14 +0100
Subject: [PATCH] Consolidate the setting of ironic-extra-vars

Only use a single shell task to set ironic-extra-vars in each playbook. In
the old project config directory these sections had names like
"ironic-deploy-with-IPA", "ironic-ipxe-disabled" ... but the names have been
lost so keeping them seperate make no sense.

Change-Id: I06176a1cb4a213670b04c5a0e7d8d4a1f3ee94e7
---
 .../run.yaml                                  | 76 ++++++-------------
 playbooks/legacy/grenade-dsvm-ironic/run.yaml | 26 +++----
 .../legacy/tempest-dsvm-ironic-bfv/run.yaml   | 26 ++-----
 .../run.yaml                                  |  7 --
 .../run.yaml                                  | 20 -----
 .../tempest-dsvm-ironic-inspector/run.yaml    | 31 ++------
 .../run.yaml                                  | 18 +----
 .../run.yaml                                  |  8 --
 .../run.yaml                                  |  7 --
 .../run.yaml                                  | 50 +++++-------
 .../run.yaml                                  |  7 --
 .../run.yaml                                  |  7 --
 .../tempest-dsvm-ironic-pxe_ipa-full/run.yaml |  7 --
 .../run.yaml                                  | 22 ------
 14 files changed, 65 insertions(+), 247 deletions(-)

diff --git a/playbooks/legacy/grenade-dsvm-ironic-multinode-multitenant/run.yaml b/playbooks/legacy/grenade-dsvm-ironic-multinode-multitenant/run.yaml
index f3a2d05ae9..ad333b4dae 100644
--- a/playbooks/legacy/grenade-dsvm-ironic-multinode-multitenant/run.yaml
+++ b/playbooks/legacy/grenade-dsvm-ironic-multinode-multitenant/run.yaml
@@ -53,65 +53,37 @@
         cmd: |
           cat << 'EOF' >> ironic-extra-vars
             export PROJECTS="openstack-dev/grenade $PROJECTS"
-          export DEVSTACK_GATE_GRENADE=pullup
-          export DEVSTACK_GATE_OS_TEST_TIMEOUT=2400
-          export DEVSTACK_GATE_TEMPEST_BAREMETAL_BUILD_TIMEOUT=1200
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_BUILD_DEPLOY_RAMDISK=False"
-          export DEVSTACK_GATE_TLSPROXY=0
-          export BUILD_TIMEOUT
+            export DEVSTACK_GATE_GRENADE=pullup
+            export DEVSTACK_GATE_OS_TEST_TIMEOUT=2400
+            export DEVSTACK_GATE_TEMPEST_BAREMETAL_BUILD_TIMEOUT=1200
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_BUILD_DEPLOY_RAMDISK=False"
+            export DEVSTACK_GATE_TLSPROXY=0
+            export BUILD_TIMEOUT
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export GRENADE_PLUGINRC+=$'\n'"enable_grenade_plugin networking-generic-switch https://git.openstack.org/openstack/networking-generic-switch"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_TOPOLOGY="multinode"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_OS_TEST_TIMEOUT=2400
-          # networking-generic-switch requires sudo to execute ovs-vsctl commands
-          export DEVSTACK_GATE_REMOVE_STACK_SUDO=0
-          export PROJECTS="openstack/networking-generic-switch $PROJECTS"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin networking-generic-switch git://git.openstack.org/openstack/networking-generic-switch"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_USE_LINK_LOCAL=True"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"OVS_PHYSICAL_BRIDGE=brbm"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"PHYSICAL_NETWORK=mynetwork"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_PROVISION_NETWORK_NAME=ironic-provision"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_PROVISION_SUBNET_PREFIX=10.0.5.0/24"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_PROVISION_SUBNET_GATEWAY=10.0.5.1"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_PLUGIN=ml2"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_USE_PROVIDERNET_FOR_PUBLIC=False"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"ENABLE_TENANT_VLANS=True"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_ML2_TENANT_NETWORK_TYPE=vlan"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"TENANT_VLAN_RANGE=100:150"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_ENABLED_NETWORK_INTERFACES=flat,neutron"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_NETWORK_INTERFACE=neutron"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_AUTOMATED_CLEAN_ENABLED=False"
+            # networking-generic-switch requires sudo to execute ovs-vsctl commands
+            export DEVSTACK_GATE_REMOVE_STACK_SUDO=0
+            export PROJECTS="openstack/networking-generic-switch $PROJECTS"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin networking-generic-switch git://git.openstack.org/openstack/networking-generic-switch"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_USE_LINK_LOCAL=True"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"OVS_PHYSICAL_BRIDGE=brbm"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"PHYSICAL_NETWORK=mynetwork"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_PROVISION_NETWORK_NAME=ironic-provision"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_PROVISION_SUBNET_PREFIX=10.0.5.0/24"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_PROVISION_SUBNET_GATEWAY=10.0.5.1"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_PLUGIN=ml2"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_USE_PROVIDERNET_FOR_PUBLIC=False"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"ENABLE_TENANT_VLANS=True"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_ML2_TENANT_NETWORK_TYPE=vlan"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"TENANT_VLAN_RANGE=100:150"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_ENABLED_NETWORK_INTERFACES=flat,neutron"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_NETWORK_INTERFACE=neutron"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_AUTOMATED_CLEAN_ENABLED=False"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
diff --git a/playbooks/legacy/grenade-dsvm-ironic/run.yaml b/playbooks/legacy/grenade-dsvm-ironic/run.yaml
index 3f118d93fb..1eef354b84 100644
--- a/playbooks/legacy/grenade-dsvm-ironic/run.yaml
+++ b/playbooks/legacy/grenade-dsvm-ironic/run.yaml
@@ -31,12 +31,16 @@
         cmd: |
           cat << 'EOF' >> ironic-extra-vars
             export PROJECTS="openstack-dev/grenade $PROJECTS"
-          export DEVSTACK_GATE_GRENADE=pullup
-          export DEVSTACK_GATE_OS_TEST_TIMEOUT=2400
-          export DEVSTACK_GATE_TEMPEST_BAREMETAL_BUILD_TIMEOUT=1200
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_BUILD_DEPLOY_RAMDISK=False"
-          export DEVSTACK_GATE_TLSPROXY=0
-          export BUILD_TIMEOUT
+            export DEVSTACK_GATE_GRENADE=pullup
+            export DEVSTACK_GATE_OS_TEST_TIMEOUT=2400
+            export DEVSTACK_GATE_TEMPEST_BAREMETAL_BUILD_TIMEOUT=1200
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_BUILD_DEPLOY_RAMDISK=False"
+            export DEVSTACK_GATE_TLSPROXY=0
+            export BUILD_TIMEOUT
+
+            # Standardize VM size for each supported ramdisk
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
           EOF
         chdir: '{{ ansible_user_dir }}/workspace'
@@ -52,16 +56,6 @@
         chdir: '{{ ansible_user_dir }}/workspace'
       environment: '{{ zuul | zuul_legacy_vars }}'
 
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
-            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
-            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
-
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
     - shell:
         cmd: |
           set -e
diff --git a/playbooks/legacy/tempest-dsvm-ironic-bfv/run.yaml b/playbooks/legacy/tempest-dsvm-ironic-bfv/run.yaml
index de254603d4..0de2434507 100644
--- a/playbooks/legacy/tempest-dsvm-ironic-bfv/run.yaml
+++ b/playbooks/legacy/tempest-dsvm-ironic-bfv/run.yaml
@@ -8,15 +8,14 @@
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_TEMPEST_REGEX="baremetal_boot_from_volume"
 
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_ENABLED_STORAGE_INTERFACES=cinder,noop"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_STORAGE_INTERFACE=cinder"
+            # We have to enable cinder this way, as normally when
+            # DEVSTACK_GATE_IRONIC=1 it disables all the cinder services.
+            export ENABLED_SERVICES=cinder,c-sch,c-api,c-vol
+
           EOF
         chdir: '{{ ansible_user_dir }}/workspace'
       environment: '{{ zuul | zuul_legacy_vars }}'
@@ -32,19 +31,6 @@
         chdir: '{{ ansible_user_dir }}/workspace'
       environment: '{{ zuul | zuul_legacy_vars }}'
 
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
-            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_ENABLED_STORAGE_INTERFACES=cinder,noop"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_STORAGE_INTERFACE=cinder"
-          # We have to enable cinder this way, as normally when
-          # DEVSTACK_GATE_IRONIC=1 it disables all the cinder services.
-          export ENABLED_SERVICES=cinder,c-sch,c-api,c-vol
-
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
     - shell:
         cmd: |
           set -e
diff --git a/playbooks/legacy/tempest-dsvm-ironic-functional-python2/run.yaml b/playbooks/legacy/tempest-dsvm-ironic-functional-python2/run.yaml
index 086c01d25d..0a7eca3751 100644
--- a/playbooks/legacy/tempest-dsvm-ironic-functional-python2/run.yaml
+++ b/playbooks/legacy/tempest-dsvm-ironic-functional-python2/run.yaml
@@ -29,13 +29,6 @@
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_TEMPEST_REGEX="ironic_tempest_plugin.tests.api"
 
           EOF
diff --git a/playbooks/legacy/tempest-dsvm-ironic-functional-python3/run.yaml b/playbooks/legacy/tempest-dsvm-ironic-functional-python3/run.yaml
index 479a6e9004..bb89c143c7 100644
--- a/playbooks/legacy/tempest-dsvm-ironic-functional-python3/run.yaml
+++ b/playbooks/legacy/tempest-dsvm-ironic-functional-python3/run.yaml
@@ -8,32 +8,12 @@
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_TEMPEST_REGEX="ironic_tempest_plugin.tests.api"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-vars-early
             # use tempest plugin
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"TEMPEST_PLUGINS+=' /opt/stack/new/ironic-tempest-plugin'"
             export TEMPEST_CONCURRENCY=1
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
 
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_USE_PYTHON3=True
 
           EOF
diff --git a/playbooks/legacy/tempest-dsvm-ironic-inspector/run.yaml b/playbooks/legacy/tempest-dsvm-ironic-inspector/run.yaml
index 351e5e76f9..1dc57deb0a 100644
--- a/playbooks/legacy/tempest-dsvm-ironic-inspector/run.yaml
+++ b/playbooks/legacy/tempest-dsvm-ironic-inspector/run.yaml
@@ -8,38 +8,17 @@
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_TEMPEST_REGEX="InspectorBasicTest"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export PROJECTS="openstack/ironic-inspector $PROJECTS"
-          export PROJECTS="openstack/python-ironic-inspector-client $PROJECTS"
-          export DEVSTACK_GATE_IRONIC_INSPECTOR=1
+            export PROJECTS="openstack/python-ironic-inspector-client $PROJECTS"
+            export DEVSTACK_GATE_IRONIC_INSPECTOR=1
 
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin ironic-inspector git://git.openstack.org/openstack/ironic-inspector"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin ironic-inspector git://git.openstack.org/openstack/ironic-inspector"
 
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_INSPECTOR_MANAGE_FIREWALL=True"
+            # Make IPXE configuration consistent between Mitaka and Master
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_INSPECTOR_MANAGE_FIREWALL=True"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-vars-early
-            # use tempest plugin
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"TEMPEST_PLUGINS+=' /opt/stack/new/ironic-tempest-plugin'"
             export TEMPEST_CONCURRENCY=1
 
diff --git a/playbooks/legacy/tempest-dsvm-ironic-ipa-partition-pxe_ipmitool-tinyipa-python3/run.yaml b/playbooks/legacy/tempest-dsvm-ironic-ipa-partition-pxe_ipmitool-tinyipa-python3/run.yaml
index 53d4d3e7d9..4cee15c91b 100644
--- a/playbooks/legacy/tempest-dsvm-ironic-ipa-partition-pxe_ipmitool-tinyipa-python3/run.yaml
+++ b/playbooks/legacy/tempest-dsvm-ironic-ipa-partition-pxe_ipmitool-tinyipa-python3/run.yaml
@@ -9,15 +9,10 @@
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_TEMPEST_REGEX="ironic_tempest_plugin.tests.scenario"
 
+            export DEVSTACK_GATE_USE_PYTHON3=True
+
           EOF
         chdir: '{{ ansible_user_dir }}/workspace'
       environment: '{{ zuul | zuul_legacy_vars }}'
@@ -32,15 +27,6 @@
         chdir: '{{ ansible_user_dir }}/workspace'
       environment: '{{ zuul | zuul_legacy_vars }}'
 
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
-            export DEVSTACK_GATE_USE_PYTHON3=True
-
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
     - shell:
         cmd: |
           set -e
diff --git a/playbooks/legacy/tempest-dsvm-ironic-ipa-partition-redfish-tinyipa/run.yaml b/playbooks/legacy/tempest-dsvm-ironic-ipa-partition-redfish-tinyipa/run.yaml
index bbee24efac..4a79612f98 100644
--- a/playbooks/legacy/tempest-dsvm-ironic-ipa-partition-redfish-tinyipa/run.yaml
+++ b/playbooks/legacy/tempest-dsvm-ironic-ipa-partition-redfish-tinyipa/run.yaml
@@ -9,16 +9,8 @@
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_TEMPEST_REGEX="ironic_tempest_plugin.tests.scenario"
 
-          EOF
         chdir: '{{ ansible_user_dir }}/workspace'
       environment: '{{ zuul | zuul_legacy_vars }}'
 
diff --git a/playbooks/legacy/tempest-dsvm-ironic-ipa-partition-uefi-pxe_ipmitool-tinyipa/run.yaml b/playbooks/legacy/tempest-dsvm-ironic-ipa-partition-uefi-pxe_ipmitool-tinyipa/run.yaml
index 08ba6e7347..513f034b4d 100644
--- a/playbooks/legacy/tempest-dsvm-ironic-ipa-partition-uefi-pxe_ipmitool-tinyipa/run.yaml
+++ b/playbooks/legacy/tempest-dsvm-ironic-ipa-partition-uefi-pxe_ipmitool-tinyipa/run.yaml
@@ -9,13 +9,6 @@
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_TEMPEST_REGEX="ironic_tempest_plugin.tests.scenario"
 
           EOF
diff --git a/playbooks/legacy/tempest-dsvm-ironic-ipa-wholedisk-agent_ipmitool-tinyipa-multinode/run.yaml b/playbooks/legacy/tempest-dsvm-ironic-ipa-wholedisk-agent_ipmitool-tinyipa-multinode/run.yaml
index 1c40a4a374..7e1c67bbf7 100644
--- a/playbooks/legacy/tempest-dsvm-ironic-ipa-wholedisk-agent_ipmitool-tinyipa-multinode/run.yaml
+++ b/playbooks/legacy/tempest-dsvm-ironic-ipa-wholedisk-agent_ipmitool-tinyipa-multinode/run.yaml
@@ -9,41 +9,27 @@
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_TOPOLOGY="multinode"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_OS_TEST_TIMEOUT=2400
-          # networking-generic-switch requires sudo to execute ovs-vsctl commands
-          export DEVSTACK_GATE_REMOVE_STACK_SUDO=0
-          export PROJECTS="openstack/networking-generic-switch $PROJECTS"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin networking-generic-switch git://git.openstack.org/openstack/networking-generic-switch"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_USE_LINK_LOCAL=True"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"OVS_PHYSICAL_BRIDGE=brbm"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"PHYSICAL_NETWORK=mynetwork"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_PROVISION_NETWORK_NAME=ironic-provision"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_PROVISION_SUBNET_PREFIX=10.0.5.0/24"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_PROVISION_SUBNET_GATEWAY=10.0.5.1"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_PLUGIN=ml2"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_USE_PROVIDERNET_FOR_PUBLIC=False"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"ENABLE_TENANT_VLANS=True"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_ML2_TENANT_NETWORK_TYPE=vlan"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"TENANT_VLAN_RANGE=100:150"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_ENABLED_NETWORK_INTERFACES=flat,neutron"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_NETWORK_INTERFACE=neutron"
-          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_AUTOMATED_CLEAN_ENABLED=False"
+            # networking-generic-switch requires sudo to execute ovs-vsctl commands
+            export DEVSTACK_GATE_REMOVE_STACK_SUDO=0
+            export PROJECTS="openstack/networking-generic-switch $PROJECTS"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin networking-generic-switch git://git.openstack.org/openstack/networking-generic-switch"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_USE_LINK_LOCAL=True"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"OVS_PHYSICAL_BRIDGE=brbm"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"PHYSICAL_NETWORK=mynetwork"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_PROVISION_NETWORK_NAME=ironic-provision"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_PROVISION_SUBNET_PREFIX=10.0.5.0/24"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_PROVISION_SUBNET_GATEWAY=10.0.5.1"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_PLUGIN=ml2"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_USE_PROVIDERNET_FOR_PUBLIC=False"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"ENABLE_TENANT_VLANS=True"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_ML2_TENANT_NETWORK_TYPE=vlan"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"TENANT_VLAN_RANGE=100:150"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_ENABLED_NETWORK_INTERFACES=flat,neutron"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_NETWORK_INTERFACE=neutron"
+            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_AUTOMATED_CLEAN_ENABLED=False"
 
           EOF
         chdir: '{{ ansible_user_dir }}/workspace'
diff --git a/playbooks/legacy/tempest-dsvm-ironic-ipa-wholedisk-bios-agent_ipmitool-tinyipa/run.yaml b/playbooks/legacy/tempest-dsvm-ironic-ipa-wholedisk-bios-agent_ipmitool-tinyipa/run.yaml
index 6bd6448a57..5da385c85f 100644
--- a/playbooks/legacy/tempest-dsvm-ironic-ipa-wholedisk-bios-agent_ipmitool-tinyipa/run.yaml
+++ b/playbooks/legacy/tempest-dsvm-ironic-ipa-wholedisk-bios-agent_ipmitool-tinyipa/run.yaml
@@ -9,13 +9,6 @@
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_TEMPEST_REGEX="ironic_tempest_plugin.tests.scenario"
 
           EOF
diff --git a/playbooks/legacy/tempest-dsvm-ironic-ipa-wholedisk-bios-pxe_snmp-tinyipa/run.yaml b/playbooks/legacy/tempest-dsvm-ironic-ipa-wholedisk-bios-pxe_snmp-tinyipa/run.yaml
index 92b6d80bbc..3a807bc5af 100644
--- a/playbooks/legacy/tempest-dsvm-ironic-ipa-wholedisk-bios-pxe_snmp-tinyipa/run.yaml
+++ b/playbooks/legacy/tempest-dsvm-ironic-ipa-wholedisk-bios-pxe_snmp-tinyipa/run.yaml
@@ -9,13 +9,6 @@
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_TEMPEST_REGEX="ironic_tempest_plugin.tests.scenario"
 
           EOF
diff --git a/playbooks/legacy/tempest-dsvm-ironic-pxe_ipa-full/run.yaml b/playbooks/legacy/tempest-dsvm-ironic-pxe_ipa-full/run.yaml
index bb1f5ed809..607d94d6d8 100644
--- a/playbooks/legacy/tempest-dsvm-ironic-pxe_ipa-full/run.yaml
+++ b/playbooks/legacy/tempest-dsvm-ironic-pxe_ipa-full/run.yaml
@@ -8,13 +8,6 @@
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_TEMPEST_FULL=1
 
           EOF
diff --git a/playbooks/legacy/tempest-dsvm-ironic-pxe_ipmitool-postgres/run.yaml b/playbooks/legacy/tempest-dsvm-ironic-pxe_ipmitool-postgres/run.yaml
index ff10edbefc..e46c66bacf 100644
--- a/playbooks/legacy/tempest-dsvm-ironic-pxe_ipmitool-postgres/run.yaml
+++ b/playbooks/legacy/tempest-dsvm-ironic-pxe_ipmitool-postgres/run.yaml
@@ -9,31 +9,9 @@
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_TEMPEST_REGEX="ironic_tempest_plugin.tests.scenario"
-
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_GATE_POSTGRES=1
 
-          EOF
-        chdir: '{{ ansible_user_dir }}/workspace'
-      environment: '{{ zuul | zuul_legacy_vars }}'
-
-    - shell:
-        cmd: |
-          cat << 'EOF' >> ironic-extra-vars
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_IPXE_ENABLED=False"
 
           EOF