[EDGEPOD-186] Add Ansible playbook for Aether Edge
Change-Id: I71d73a5a4fdf7e5ccf12df924597af6ab90a68b4
diff --git a/aether-playbook/reset.yml b/aether-playbook/reset.yml
new file mode 100644
index 0000000..c0a0ffe
--- /dev/null
+++ b/aether-playbook/reset.yml
@@ -0,0 +1,43 @@
+# 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 }