Skip to content

Commit

Permalink
Added feature to write update report to file
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonking3 committed Oct 13, 2023
1 parent 00bbc6c commit 608af37
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions roles/nso/tasks/update_report.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
- name: Write update report to file
copy:
content: "{{ hostvars[inventory_hostname].nso_config_result.commit_result[0].dry_run_result.native.device[0].data }}"
dest: "{{ lookup('env', 'PWD') }}/{{ inventory_hostname }}_result.txt"
when: log | bool
vars:
log: no

- set_fact:
update_report: "{{ lookup('template', 'update-report.yml.j2') | from_yaml }}"

Expand Down

0 comments on commit 608af37

Please sign in to comment.