--- - name: Create release directory file: path={{ release_dir }} state=directory owner=ansible group=ansible become: true - name: Create static directory file: path={{ release_dir }}/static state=directory owner=ansible group=www-data become: true - name: Set static directory permissions file: dest={{ release_dir }}/static owner=ansible group=www-data mode=u=rwX,g=rX,o=rX recurse=yes become: true - name: Install JavaScript packages with Yarn yarn: path: "{{ release_dir }}" - name: Create libs directory file: path: "{{ release_dir }}/publichealth/static/libs/" state: directory - name: Copy npm components to libs copy: src: "{{ release_dir }}/node_modules/@bower_components/" dest: "{{ release_dir }}/publichealth/static/libs/" remote_src: yes force: yes - name: Compile frontend sources with Grunt shell: "/usr/local/lib/npm/bin/grunt --force" args: chdir: "{{ release_dir }}"