From 77ee580ceb2d15386bad7c74bd153ff8d0080f0a Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Thu, 6 Sep 2018 11:15:25 +0100 Subject: [PATCH] Improve output of Verify Sphinx build task Avoid repeated output of HTML content on console and marks the task as not changed in ansible. A grep failure would be easy to investigate as the file is collected. Change-Id: I7520e8f3b5c01f39affeac398aeaeffe6dfdb6cf Partial-Bug: #1787912 --- roles/collect-logs/tasks/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/collect-logs/tasks/main.yml b/roles/collect-logs/tasks/main.yml index 777cf79..5a275ea 100644 --- a/roles/collect-logs/tasks/main.yml +++ b/roles/collect-logs/tasks/main.yml @@ -21,8 +21,10 @@ - not artcl_collect|bool - name: Verify Sphinx build - shell: grep "{{ item }}" "{{ artcl_collect_dir }}/docs/build/index.html" + shell: + grep -q "{{ item }}" "{{ artcl_collect_dir }}/docs/build/index.html" with_items: "{{ artcl_create_docs_payload.table_of_contents }}" + changed_when: false when: - artcl_gen_docs|bool - artcl_verify_sphinx_build|bool