Skip to content

Commit

Permalink
Added feature to write update report to file (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonking3 authored Oct 19, 2023
1 parent 00bbc6c commit d2c3c2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace: ciscops
name: mdd

# The version of the collection. Must be compatible with semantic versioning
version: 1.2.12
version: 1.2.13

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
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 d2c3c2d

Please sign in to comment.