Files
tripleo-ha-utils/roles/collect-logs/tasks/create-docs.yml
Harry Rybacki ce7982192f Integrate undercloud_user var into oooq-extras
We need to differentiate local_working_dir from working_dir
as well as decouple the stack user from `ansible_user` var.
Both of these are causing issues as we begin to automate
deployments in more environments.

- Cleanup duplicate variables that are consumed via extras-common
  - Note: extras-common depends on the common role in OOOQ
- Cleanup redundant var and superfluous quotes from overcloud-scale
  role
- Cleanup redundant comments in <role>/defaults/main.yml

Closes-bug: 1654574
Change-Id: I9c7a3166ed1fc5042c11e420223134ea912b45c5
2017-01-18 09:32:16 -05:00

38 lines
1.4 KiB
YAML

---
- name: Ensure required python packages are installed
pip:
requirements: "{{ local_working_dir }}/usr/local/share/ansible/roles/collect-logs/doc-requirements.txt"
- name: Unarchive shell scripts
shell: >
gunzip "{{ artcl_collect_dir }}/undercloud/home/{{ undercloud_user }}/{{ item }}.sh.gz";
with_items: "{{ artcl_create_docs_payload.included_deployment_scripts }}"
ignore_errors: yes
when: artcl_gzip_only|bool
- name: Generate rST docs from scripts and move to Sphinx src dir
shell: >
awk -f "{{ local_working_dir }}/usr/local/share/ansible/roles/collect-logs/scripts/doc_extrapolation.awk" \
"{{ artcl_collect_dir }}/undercloud/home/{{ undercloud_user }}/{{ item }}.sh" > \
"{{ artcl_docs_source_dir }}/{{ item }}.rst"
with_items: "{{ artcl_create_docs_payload.included_deployment_scripts }}"
ignore_errors: yes
- name: Fetch static rST docs to include in output docs
shell: >
cp "{{ artcl_docs_source_dir }}/../static/{{ item }}.rst" "{{ artcl_docs_source_dir }}"
with_items: "{{ artcl_create_docs_payload.included_static_docs }}"
ignore_errors: yes
- name: Generate fresh index.rst for Sphinx
template:
src: index.rst.j2
dest: "{{ artcl_docs_source_dir }}/index.rst"
force: yes
- name: Build docs with Sphinx
shell: >
sphinx-build -b html "{{ artcl_docs_source_dir }}" \
"{{ artcl_docs_build_dir }}" &> "{{ local_working_dir }}/sphinx_build.log"