summaryrefslogtreecommitdiffstats
path: root/installation
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-03-29 12:58:53 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-29 12:58:53 +0000
commitd6346ad42dca37c99773040d88b19227d80a26a6 (patch)
treef2fa85ba913cd02173e2a2509b1826bdb2dae9ed /installation
parent6dd642bbc3a378c15c7e74f2e1fd8cf9722e4b55 (diff)
parentc11ca8e2ea698fc16f0c2bd368a6de74974ac270 (diff)
Merge "Add Ansible playbook for PNF software rollback"
Former-commit-id: 8099c4a748356dd67a3fddddc340950439575ad8
Diffstat (limited to 'installation')
-rw-r--r--installation/ansible-server/src/main/Playbooks/ansible_huawei_rollback@0.00.yml21
1 files changed, 21 insertions, 0 deletions
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
index 00000000..ef56c54f
--- /dev/null
+++ b/installation/ansible-server/src/main/Playbooks/ansible_huawei_rollback@0.00.yml
@@ -0,0 +1,21 @@
+---
+- hosts: all
+ tasks:
+ - name: create a temporary file for additional data
+ file:
+ path: /tmp/tmp-{{Id}}
+ state: touch
+ become: false
+
+ - name: prepare additional data
+ shell: echo {{additionalData}} > /tmp/tmp-{{Id}}
+ become: false
+
+ - name: execute rollback operation
+ shell: ./swm/rollback.sh {{pnfId}} {{oldSwVersion}} /tmp/tmp-{{Id}}
+
+ - name: remove the temporary file
+ file:
+ path: /tmp/tmp-{{Id}}
+ state: absent
+ become: false