2017-04-24 16:09:26 +00:00
|
|
|
---
|
|
|
|
|
2020-05-16 17:01:32 +00:00
|
|
|
- name: Create release directory
|
|
|
|
file: path={{ release_dir }} state=directory owner=ansible group=ansible
|
|
|
|
become: true
|
|
|
|
|
2020-05-16 19:15:23 +00:00
|
|
|
- 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
|
|
|
|
|
2020-05-16 16:44:51 +00:00
|
|
|
- name: Install JavaScript packages with Yarn
|
|
|
|
yarn:
|
2017-04-24 16:09:26 +00:00
|
|
|
path: "{{ release_dir }}"
|
2020-05-16 16:44:51 +00:00
|
|
|
|
2020-05-16 17:01:32 +00:00
|
|
|
- name: Create libs directory
|
2020-05-16 16:44:51 +00:00
|
|
|
file:
|
2020-05-16 17:01:32 +00:00
|
|
|
path: "{{ release_dir }}/publichealth/static/libs/"
|
|
|
|
state: directory
|
|
|
|
|
2021-02-20 12:55:55 +00:00
|
|
|
- name: Copy npm components to libs
|
2020-05-16 17:01:32 +00:00
|
|
|
copy:
|
|
|
|
src: "{{ release_dir }}/node_modules/@bower_components/"
|
|
|
|
dest: "{{ release_dir }}/publichealth/static/libs/"
|
|
|
|
remote_src: yes
|
|
|
|
force: yes
|
2020-05-16 16:44:51 +00:00
|
|
|
|
2021-02-20 14:34:47 +00:00
|
|
|
- name: Compile frontend sources with Grunt
|
|
|
|
shell: "/usr/local/lib/npm/bin/grunt --force"
|
2020-05-16 16:44:51 +00:00
|
|
|
args:
|
|
|
|
chdir: "{{ release_dir }}"
|