add title and change dir for result

Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Goncharov, Artem argoncha <artem.goncharov@t-systems.com>
Co-committed-by: Goncharov, Artem argoncha <artem.goncharov@t-systems.com>
This commit is contained in:
Goncharov, Artem argoncha
2022-07-25 18:37:21 +00:00
committed by zuul
parent d30453af0d
commit 1065be13f8
3 changed files with 15 additions and 3 deletions

View File

@ -1 +1,2 @@
zuul_work_virtualenv: "{{ ansible_user_dir }}/.venv"
convert_params: ""

View File

@ -1,7 +1,17 @@
- name: Emit pandoc version
command: "pandoc --version"
- name: Add destination to parameters
ansible.builtin.set_fact:
convert_params: "{{ convert_params }} --dest {{ dest }}"
when: "dest is defined"
- name: Add title to parameters
ansible.builtin.set_fact:
convert_params: "{{ convert_params }} --title '{{ title }}'"
when: "title is defined"
- name: Convert {{ doc_label | default('') }} HTML to RST
args:
executable: "/bin/bash"
shell: "source {{ zuul_work_virtualenv }}/bin/activate; otc-convert-doc --dest {{ dest }} {{ source }}"
ansible.builtin.shell: "source {{ zuul_work_virtualenv }}/bin/activate; otc-convert-doc {{ convert_params }} {{ source }}"