Browse Source

Remove some redundant tasks from cli-overcloud-node-unprovision.yaml

We don't seem to use unprovision_environment var from the cli and
these tasks are always skipped.

Change-Id: I5fcdfef10337c42b627b290e9d0e8106a829f112
tags/1.7.0
Rabi Mishra 1 month ago
parent
commit
7a25343921
1 changed files with 5 additions and 21 deletions
  1. +5
    -21
      tripleo_ansible/playbooks/cli-overcloud-node-unprovision.yaml

+ 5
- 21
tripleo_ansible/playbooks/cli-overcloud-node-unprovision.yaml View File

@@ -33,11 +33,10 @@
when:
- baremetal_deployment is undefined
- fail:
msg: unprovision_confirm or unprovision_environment is required when prompt is true
msg: unprovision_confirm is required when prompt is true
when:
- prompt
- unprovision_confirm is undefined
- unprovision_environment is undefined

tasks:

@@ -54,25 +53,10 @@
register: baremetal_existing

- name: Write unprovision confirmation
block:
- name: Write instances for confirmation
copy:
dest: "{{ unprovision_confirm }}"
content: "{{ baremetal_existing.instances | to_json }}"
when: unprovision_confirm is defined
- name: Expand roles for provisioned instances
tripleo_baremetal_expand_roles:
baremetal_deployment: "{{ baremetal_deployment }}"
stack_name: "{{ stack_name }}"
state: present
register: baremetal_instances_existing
when: unprovision_environment is defined
- name: Write environment for node delete resource mapping
copy:
dest: "{{ unprovision_environment }}"
content: "{{ baremetal_instances_existing.environment | to_json }}"
when: unprovision_environment is defined
when: prompt|bool
copy:
dest: "{{ unprovision_confirm }}"
content: "{{ baremetal_existing.instances | to_json }}"
when: prompt|bool and unprovision_confirm is defined

- name: Unprovision instances
metalsmith_instances:


Loading…
Cancel
Save