Merge "Add Ansible playbook for PNF software rollback"
authorDan Timoney <dtimoney@att.com>
Fri, 29 Mar 2019 12:58:53 +0000 (12:58 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 29 Mar 2019 12:58:53 +0000 (12:58 +0000)
Former-commit-id: 8099c4a748356dd67a3fddddc340950439575ad8

installation/ansible-server/src/main/Playbooks/ansible_huawei_rollback@0.00.yml [new file with mode: 0644]

diff --git a/installation/ansible-server/src/main/Playbooks/ansible_huawei_rollback@0.00.yml b/installation/ansible-server/src/main/Playbooks/ansible_huawei_rollback@0.00.yml
new file mode 100644 (file)
index 0000000..ef56c54
--- /dev/null
@@ -0,0 +1,21 @@
+---\r
+- hosts: all\r
+  tasks:\r
+  - name: create a temporary file for additional data\r
+    file: \r
+        path: /tmp/tmp-{{Id}}\r
+        state: touch\r
+    become: false\r
+\r
+  - name: prepare additional data\r
+    shell: echo {{additionalData}} > /tmp/tmp-{{Id}}\r
+    become: false\r
+\r
+  - name: execute rollback operation\r
+    shell: ./swm/rollback.sh {{pnfId}} {{oldSwVersion}} /tmp/tmp-{{Id}}\r
+\r
+  - name: remove the temporary file\r
+    file:\r
+        path: /tmp/tmp-{{Id}}\r
+        state: absent\r
+    become: false\r