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 post-check operation
\r
15 shell: ./swm/upgrade-post-check {{pnfId}} {{oldSwVersion}} {{targetSwVersion}} {{ruleName}} /tmp/tmp-{{Id}}
\r
17 register: postcheck_result
\r
19 - name: write output to file
\r
20 local_action: copy content="{{postcheck_result.stdout}}" dest="{{inventory_dir}}/{{inventory_hostname}}_results.txt"
\r
21 when: postcheck_result.stdout != ""
\r
23 - name: remove the temporary file
\r
25 path: /tmp/tmp-{{Id}}
\r
29 - name: use result of post-check as the result of Playbook
\r
31 msg: "{{postcheck_result.stderr}}"
\r
32 when: postcheck_result is failed
\r