ansible/roles/constellation-doc/tasks/main.yml

24 lines
626 B
YAML

---
- name: Install Sphinx and RTD theme
ansible.builtin.apt:
update_cache: true
install_recommends: false
name:
- python3-sphinx
- python3-sphinx-rtd-theme
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Create documentation directory with good permissions
ansible.builtin.file:
path: /var/www/constellation-doc
state: directory
owner: www-data
group: www-data
mode: u=rwx,g=rwxs,o=rx
- name: Build HTML documentation
ansible.builtin.command: sphinx-build -b dirhtml {{ project_path }}/docs/ /var/www/constellation-doc/
become_user: www-data