Skip to content

Commit c25db6a

Browse files
committed
add node task
1 parent e179b4f commit c25db6a

File tree

3 files changed

+35
-11
lines changed

3 files changed

+35
-11
lines changed

defaults/main.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,35 +48,46 @@ flaskapp_app_packages:
4848
- python-dev
4949
- python-virtualenv
5050
- libpq-dev
51-
- python-psycopg2
5251
- build-essential
5352

5453
# Additional system packages required by your application
5554
flaskapp_additional_app_packages:
5655

5756
# Install `nodejs` and required package dependencies via `npm`?
58-
flaskapp_app_requires_npm: no
57+
flaskapp_app_requires_npm: false
5958

6059
# Install frontend package dependencies via `bower`?
61-
flaskapp_app_requires_bower: no
60+
flaskapp_app_requires_bower: false
6261

6362
# Install and configure Postgresql
6463
flaskapp_use_postgresql: true
6564

66-
# Defines if migrations should be run (via Flask-Migrate)
67-
flaskapp_run_migrations: false
65+
# Postgresql db user
66+
flaskapp_postgresql_user: {{ flaskapp_name }}
6867

69-
# Set to true if you want to use a custom supervisor config (you need to provisioning it by yourself)
70-
flaskapp_use_custom_supervisor_conf: false
68+
# Postgresql db password
69+
flaskapp_postgresql_pasword: xxxxx
7170

72-
# Set to true if you want to use a custom nginx config (you need to provisioning it by yourself)
73-
flaskapp_use_custom_nginx_conf: false
71+
# Postgresql db table name
72+
flaskapp_postgresql_table: {{ flaskapp_name }}
7473

75-
# Set to true if you want to use a custom startup script used by supervisor (you need to provisioning it by yourself)
76-
flaskapp_use_custom_start_script: false
74+
# Defines if migrations should be run during deployment (via Flask-Migrate)
75+
flaskapp_run_migrations: false
76+
77+
# Directory with migrations scripts
78+
flaskapp_migrations_dir: ../migrations
7779

7880
# Nginx server name
7981
flaskapp_nginx_server_name: {{ flaskapp_name }}.domain.com
8082

8183
# Directory with static files served directly by Nginx
8284
flaskapp_nginx_static_dir: {{ flaskapp_app_directory }}/static/
85+
86+
# Set to true if you want to use a custom nginx config (you need to provisioning it by yourself)
87+
flaskapp_use_custom_nginx_conf: false
88+
89+
# Set to true if you want to use a custom supervisor config (you need to provisioning it by yourself)
90+
flaskapp_use_custom_supervisor_conf: false
91+
92+
# Set to true if you want to use a custom startup script used by supervisor (you need to provisioning it by yourself)
93+
flaskapp_use_custom_start_script: false

tasks/node.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# Install and setup NodeJS
3+
4+
- name: Add the nodejs repository
5+
apt_repository: repo=ppa:chris-lea/node.js state=present
6+
sudo: true
7+
8+
- name: Install the nodejs package
9+
apt: pkg=nodejs state=present
10+
sudo: true

tasks/setup.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@
99

1010
- include: postgresql.yml
1111
when: flaskapp_use_postgresql
12+
13+
- include: node.yml
14+
when: flaskapp_app_requires_npm

0 commit comments

Comments
 (0)