4 - name: create a temporary file for additional data
\r
6 path: /tmp/tmp-{{Id}}
\r
10 - name: prepare additional data
\r
11 shell: echo {{additionalData}} > /tmp/tmp-{{Id}}
\r
14 - name: execute pre-check operation
\r
15 shell: ./swm/upgrade-pre-check {{pnfId}} {{oldSwVersion}} {{targetSwVersion}} {{ruleName}} /tmp/tmp-{{Id}}
\r
17 register: precheck_result
\r
19 - name: write output to file
\r
20 local_action: copy content="{{precheck_result.stdout}}" dest="{{inventory_dir}}/{{inventory_hostname}}_results.txt"
\r
21 when: precheck_result.stdout != ""
\r
23 - name: remove the temporary file
\r
25 path: /tmp/tmp-{{Id}}
\r
29 - name: use result of pre-check as the result of Playbook
\r
31 msg: "{{precheck_result.stderr}}"
\r
32 when: precheck_result is failed
\r