Skip to content
Snippets Groups Projects
Commit 74f1bf7e authored by Matt Crees's avatar Matt Crees
Browse files

Ask for confirmation during overcloud deprovision

Prompts the user to confirm before deprovisioning any overcloud hosts.
The user is given a list of hosts which will be deprovisioned. Automatic
confirmation can be achieved by setting ``confirm_deprovison`` to
``yes``.

Change-Id: I6eea5bb7c268912e6f39627f64c92715877311a3
parent bb2af075
No related branches found
No related tags found
No related merge requests found
......@@ -29,8 +29,23 @@
ironic_retries: 6
ironic_retry_interval: 5
seed_host: "{{ groups['seed'][0] }}"
vars_prompt:
- name: confirm_deprovision
prompt: |
The following hosts will be deprovisioned:
{{ play_hosts | join(', ') }}
If you want to proceed type: yes
default: "no"
private: false
gather_facts: no
tasks:
- name: Fail if deprovision is not confirmed
assert:
that: confirm_deprovision == 'yes'
msg: >
Deprovision has not been confirmed. You must either type 'yes' when
prompted, or set ``confirm_deprovision=yes``.
- name: Check the ironic node's initial provision state
command: >
docker exec bifrost_deploy
......
......@@ -181,7 +181,9 @@ Deprovisioning The Cloud
.. note::
This step will power down the overcloud hosts and delete their nodes'
instance state from the seed's ironic service.
instance state from the seed's ironic service. This command will print a
list of hosts which will be deprovisioned, you must type ``yes`` to confirm.
To automatically confirm, pass the variable ``-e confirm_deprovision=yes``.
To deprovision the overcloud::
......
---
features:
- |
``kayobe overcloud deprovision`` now requires confirmation before any hosts
are deprovisioned. Automatic confirmation can still be achieved by setting
``confirm_deprovision`` to ``yes``.
upgrade:
- |
``kayobe overcloud deprovision`` now requires confirmation before any hosts
are deprovisioned. Automatic confirmation can still be achieved by setting
``confirm_deprovision`` to ``yes``.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment