Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added feature to write update report to file #36

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading