diff --git a/roles/collect-logs/README.md b/roles/collect-logs/README.md index ef0ff3b0e..1248b9354 100644 --- a/roles/collect-logs/README.md +++ b/roles/collect-logs/README.md @@ -43,8 +43,8 @@ artcl_collect_list: ### Documentation generation related -* `artcl_gen_docs`: true/false -- If true, the role will use build artifacts - and Sphinx and produce user friendly documentation. +* `artcl_gen_docs`: false/true -- If true, the role will use build artifacts + and Sphinx and produce user friendly documentation (default: false) * `artcl_docs_source_dir` -- a local directory that serves as the Sphinx source directory. * `artcl_docs_build_dir` -- A local directory that serves as the Sphinx build @@ -57,6 +57,9 @@ artcl_collect_list: included in the output documentation. * `table_of_contents` -- List that defines the order in which rST files will be laid out in the output documentation. +* `artcl_verify_sphinx_build` -- false/true -- If true, verify items defined + in `artcl_create_docs_payload.table_of_contents` exist in sphinx generated + index.html (default: false) ```yaml artcl_create_docs_payload: diff --git a/roles/collect-logs/defaults/main.yml b/roles/collect-logs/defaults/main.yml index ccebebda2..51f443dac 100644 --- a/roles/collect-logs/defaults/main.yml +++ b/roles/collect-logs/defaults/main.yml @@ -31,7 +31,7 @@ artcl_collect_list: - /home/stack/browbeat/results - /usr/share/openstack-tripleo-heat-templates - /tmp/tripleoclient* -artcl_collect_dir: "{{ lookup('env', 'PWD') }}/collected_files" +artcl_collect_dir: "{{ local_working_dir }}/collected_files" artcl_gzip_only: true artcl_tar_gz: false @@ -58,3 +58,4 @@ artcl_collect_sosreport: false artcl_gen_docs: false artcl_docs_source_dir: "{{ local_working_dir }}/usr/local/share/ansible/roles/collect-logs/docs/source" artcl_docs_build_dir: "{{ artcl_collect_dir }}/docs/build" +artcl_verify_sphinx_build: false diff --git a/roles/collect-logs/tasks/main.yml b/roles/collect-logs/tasks/main.yml index 20395eaea..78f837e75 100644 --- a/roles/collect-logs/tasks/main.yml +++ b/roles/collect-logs/tasks/main.yml @@ -14,3 +14,8 @@ when: - artcl_publish|bool - not artcl_collect|bool + +- name: Verify Sphinx build + shell: grep "{{ item }}" "{{ artcl_collect_dir }}/docs/build/index.html" + with_items: "{{ artcl_create_docs_payload.table_of_contents }}" + when: artcl_verify_sphinx_build|bool