From: Enbo Wang Date: Wed, 27 Mar 2019 10:22:42 +0000 (+0000) Subject: Add Ansible playbook for PNF software rollback X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=7f1168ec86880028bca8f15f0654d377f9b2a6c6;p=sdnc%2Foam.git Add Ansible playbook for PNF software rollback Change-Id: I1fd8f17954a2908207d2d7404a932a4dbd3c9ec1 Issue-ID: SDNC-671 Signed-off-by: Enbo Wang --- 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