From c11ca8e2ea698fc16f0c2bd368a6de74974ac270 Mon Sep 17 00:00:00 2001 From: Enbo Wang Date: Wed, 27 Mar 2019 10:22:42 +0000 Subject: Add Ansible playbook for PNF software rollback Change-Id: I1fd8f17954a2908207d2d7404a932a4dbd3c9ec1 Issue-ID: SDNC-671 Signed-off-by: Enbo Wang Former-commit-id: 7f1168ec86880028bca8f15f0654d377f9b2a6c6 --- .../main/Playbooks/ansible_huawei_rollback@0.00.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 installation/ansible-server/src/main/Playbooks/ansible_huawei_rollback@0.00.yml (limited to 'installation') 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 -- cgit 1.2.3-korg