---
- name: add static location to nginx config
  become: yes
  blockinfile:
    dest: '/etc/nginx/sites-available/{{NGINX_SITE}}'
    insertafter: '        # Placeholder for static site.'
    block: |
      location /api/docs {
          autoindex on;
          alias {{ALIAS_DIR}};
      }

- name: restart nginx
  become: yes
  service: name=nginx state=restarted
