[constellation] Run manage.py commands separately according to front mode
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>certbot_on_virtu
parent
01c2c508c6
commit
dda90628f8
|
@ -5,7 +5,7 @@
|
||||||
update_cache: true
|
update_cache: true
|
||||||
name:
|
name:
|
||||||
- python3-django-crispy-forms
|
- python3-django-crispy-forms
|
||||||
python3-django-filters
|
- python3-django-filters
|
||||||
- python3-djangorestframework
|
- python3-djangorestframework
|
||||||
- python3-django-tables2
|
- python3-django-tables2
|
||||||
- python3-docutils
|
- python3-docutils
|
||||||
|
@ -48,7 +48,36 @@
|
||||||
ignore_errors: "{{ ansible_check_mode }}"
|
ignore_errors: "{{ ansible_check_mode }}"
|
||||||
notify: Reload uWSGI
|
notify: Reload uWSGI
|
||||||
|
|
||||||
|
# In the future, migrations will be included in the repository.
|
||||||
|
- name: Make Django migrations
|
||||||
|
django_manage:
|
||||||
|
command: makemigrations
|
||||||
|
project_path: "/var/local/constellation"
|
||||||
|
notify: Reload uWSGI
|
||||||
|
|
||||||
|
- name: Migrate database
|
||||||
|
django_manage:
|
||||||
|
command: migrate
|
||||||
|
project_path: "/var/local/constellation"
|
||||||
|
notify: Reload uWSGI
|
||||||
|
|
||||||
|
- name: Load initial data
|
||||||
|
django_manage:
|
||||||
|
command: loaddata initial
|
||||||
|
project_path: "/var/local/constellation"
|
||||||
|
notify: Reload uWSGI
|
||||||
|
|
||||||
|
- name: Create static files directory
|
||||||
|
file:
|
||||||
|
path: /var/local/constellation/static
|
||||||
|
state: directory
|
||||||
|
mode: '2775'
|
||||||
|
owner: "www-data"
|
||||||
|
group: "{{ constellation.group }}"
|
||||||
|
recurse: true
|
||||||
|
|
||||||
- name: Collect static files
|
- name: Collect static files
|
||||||
django_manage:
|
django_manage:
|
||||||
command: collectstatic
|
command: collectstatic
|
||||||
project_path: "/var/local/constellation"
|
project_path: "/var/local/constellation"
|
||||||
|
notify: Reload uWSGI
|
||||||
|
|
|
@ -62,22 +62,26 @@
|
||||||
group: "{{ constellation.settings_local_group }}"
|
group: "{{ constellation.settings_local_group }}"
|
||||||
|
|
||||||
- name: Compile messages
|
- name: Compile messages
|
||||||
|
when: not constellation.front
|
||||||
django_manage:
|
django_manage:
|
||||||
command: compilemessages
|
command: compilemessages
|
||||||
project_path: "/var/local/constellation"
|
project_path: "/var/local/constellation"
|
||||||
|
|
||||||
# In the future, migrations will be included in the repository.
|
# In the future, migrations will be included in the repository.
|
||||||
- name: Make Django migrations
|
- name: Make Django migrations (non-front app)
|
||||||
|
when: not constellation.front
|
||||||
django_manage:
|
django_manage:
|
||||||
command: makemigrations
|
command: makemigrations
|
||||||
project_path: "/var/local/constellation"
|
project_path: "/var/local/constellation"
|
||||||
|
|
||||||
- name: Migrate database
|
- name: Migrate database (non-front app)
|
||||||
|
when: not constellation.front
|
||||||
django_manage:
|
django_manage:
|
||||||
command: migrate
|
command: migrate
|
||||||
project_path: "/var/local/constellation"
|
project_path: "/var/local/constellation"
|
||||||
|
|
||||||
- name: Load initial data
|
- name: Load initial data (non-front app)
|
||||||
|
when: not constellation.front
|
||||||
django_manage:
|
django_manage:
|
||||||
command: loaddata initial
|
command: loaddata initial
|
||||||
project_path: "/var/local/constellation"
|
project_path: "/var/local/constellation"
|
||||||
|
|
Loading…
Reference in New Issue