[constellation] Deploy documentation
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>certbot_on_virtu
							parent
							
								
									9f165ad9be
								
							
						
					
					
						commit
						372344fa10
					
				| 
						 | 
					@ -17,6 +17,10 @@ service_nginx:
 | 
				
			||||||
          params:
 | 
					          params:
 | 
				
			||||||
            - "alias {% if constellation.version == 'master' %}/var/lib/constellation/media/{% else %}/var/local/constellation/media/{% endif %}"
 | 
					            - "alias {% if constellation.version == 'master' %}/var/lib/constellation/media/{% else %}/var/local/constellation/media/{% endif %}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        - filter: "/doc"
 | 
				
			||||||
 | 
					          params:
 | 
				
			||||||
 | 
					            - "alias /var/www/constellation-doc/"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        - filter: "/"
 | 
					        - filter: "/"
 | 
				
			||||||
          params:
 | 
					          params:
 | 
				
			||||||
            - "uwsgi_pass constellation"
 | 
					            - "uwsgi_pass constellation"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,3 +13,4 @@
 | 
				
			||||||
  roles:
 | 
					  roles:
 | 
				
			||||||
    - nginx
 | 
					    - nginx
 | 
				
			||||||
    - constellation-front
 | 
					    - constellation-front
 | 
				
			||||||
 | 
					    - constellation-doc
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,23 @@
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					- name: Install Sphinx and RTD theme
 | 
				
			||||||
 | 
					  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
 | 
				
			||||||
 | 
					  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
 | 
				
			||||||
 | 
					  command: "sphinx-build -b dirhtml {{ project_path }}/docs/ /var/www/constellation-doc/"
 | 
				
			||||||
 | 
					  become_user: www-data
 | 
				
			||||||
		Loading…
	
		Reference in New Issue