aboutsummaryrefslogtreecommitdiffstats
path: root/installation/ansible-server/src/main/Playbooks/ansible_huawei_upgrade@0.00.yml
blob: 87e84ab14b0a285d47d77981bc1da980666891db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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 upgrade software operation
    shell: ./swm/upgrade-software.sh {{pnfId}} {{oldSwVersion}} {{targetSwVersion}} /tmp/tmp-{{Id}}

  - name: remove the temporary file
    file:
        path: /tmp/tmp-{{Id}}
        state: absent
    become: false