| # Copyright 2020-present Open Networking Foundation |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| --- |
| # Check ansible version |
| - hosts: localhost |
| become: no |
| gather_facts: False |
| tasks: |
| - name: "Check ansible version ==2.9.5" |
| assert: |
| msg: "Ansible must be v2.9.5" |
| that: |
| - ansible_version.string is version("2.9.5", "==") |
| vars: |
| ansible_connection: local |
| |
| - hosts: kube-master:kube-worker |
| vars_prompt: |
| name: "reset_confirmation" |
| prompt: "Are you sure you want to reset cluster state? Type 'yes' to reset your cluster." |
| default: "no" |
| private: no |
| |
| pre_tasks: |
| - name: check confirmation |
| fail: |
| msg: "Reset confirmation failed" |
| when: reset_confirmation != "yes" |
| |
| roles: |
| - { role: reset } |