You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by oc...@apache.org on 2023/01/24 16:47:56 UTC
[trafficcontrol] branch master updated: updating snapshot url and logic (#7299)
This is an automated email from the ASF dual-hosted git repository.
ocket8888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new b0b127e62a updating snapshot url and logic (#7299)
b0b127e62a is described below
commit b0b127e62ab9e5a717e12ab1a99157cdd9cd24d4
Author: Ashish P <as...@cable.comcast.com>
AuthorDate: Tue Jan 24 09:47:49 2023 -0700
updating snapshot url and logic (#7299)
Co-authored-by: Ashish Paudyal <ap...@cable.comcast.com>
---
infrastructure/ansible/roles/to_api/README.md | 2 +-
infrastructure/ansible/roles/to_api/tasks/snapshot.yml | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/infrastructure/ansible/roles/to_api/README.md b/infrastructure/ansible/roles/to_api/README.md
index 18ba8b9b44..d386ad64c1 100644
--- a/infrastructure/ansible/roles/to_api/README.md
+++ b/infrastructure/ansible/roles/to_api/README.md
@@ -26,7 +26,7 @@ Requirements
* For snapshot:
* [jq](https://stedolan.github.io/jq/)
- * [json_diff](https://json-delta.readthedocs.io/en/latest/)
+ * [jd](https://github.com/josephburnett/jd)
Role Variables
--------------
diff --git a/infrastructure/ansible/roles/to_api/tasks/snapshot.yml b/infrastructure/ansible/roles/to_api/tasks/snapshot.yml
index 0b76130faa..dc9e7debc0 100644
--- a/infrastructure/ansible/roles/to_api/tasks/snapshot.yml
+++ b/infrastructure/ansible/roles/to_api/tasks/snapshot.yml
@@ -85,7 +85,7 @@
- name: "Perform diff of {{ to_api_target_cdn }} crconfig"
delegate_to: localhost
- shell: "json_diff -u {{ precommit_snapshot_file.path }} {{ pending_snapshot_file.path }}"
+ shell: "jd {{ precommit_snapshot_file.path }} {{ pending_snapshot_file.path }}"
register: diff_output
ignore_errors: True
@@ -110,14 +110,14 @@
delegate_to: localhost
assert:
that:
- - "{{ diff_output.stdout_lines | count }} == 3"
+ - "{{ diff_output.stdout_lines | count }} == 0"
msg: "There are pending changes to the {{to_api_target_cdn}} crconfig when we expect there to be none. Please rerun with -v or manually review the diff. Aborting."
when: to_api_assert_clean_snapshot
- name: "Writing snapshot ({{ to_api_target_cdn }})"
delegate_to: localhost
uri:
- url: "{{ to_api_base_url }}/api/{{ to_api_version }}/snapshot/{{ to_api_target_cdn }}"
+ url: "{{ to_api_base_url }}/api/{{ to_api_version }}/snapshot?cdn={{ to_api_target_cdn }}"
method: PUT
follow_redirects: all
return_content: yes