Make variables more consistent across roles.

This commit is contained in:
Dorian 2016-05-17 23:39:05 -04:00
parent c3b8f46ef2
commit 2a942d51d4
5 changed files with 9 additions and 9 deletions

View File

@ -10,4 +10,4 @@ nsbase_app_root_path: "{{ nsbase_web_root_path }}/{{ nsbase_app_name }}_webapp"
# NGINX # NGINX
nsbase_app_nginx_hostname: localhost nsbase_app_nginx_hostname: localhost
nsbase_app_nginx_static_path: "{{ nsbase_app_root_path }}/{{ nsbase_app_name }}/static/" nsbase_app_static_path: "{{ nsbase_app_root_path }}/{{ nsbase_app_name }}/static/"

View File

@ -4,13 +4,13 @@
sudo: yes sudo: yes
- name: configure nginx - name: configure nginx
template: src=app_nginx.conf dest=/etc/nginx/sites-available/{{ nsbase_nginx_app_config }} template: src=app_nginx.conf dest=/etc/nginx/sites-available/{{ nsbase_app_nginx_config }}
sudo: yes sudo: yes
- name: link to enable nginx configuration - name: link to enable nginx configuration
file: state=link file: state=link
src=/etc/nginx/sites-available/{{ nsbase_nginx_app_config }} src=/etc/nginx/sites-available/{{ nsbase_app_nginx_config }}
path=/etc/nginx/sites-enabled/{{ nsbase_nginx_app_config }} path=/etc/nginx/sites-enabled/{{ nsbase_app_nginx_config }}
sudo: yes sudo: yes
- name: disable default configuration - name: disable default configuration

View File

@ -20,6 +20,6 @@
sudo: yes sudo: yes
- name: upload supervisor configuration to web server home - name: upload supervisor configuration to web server home
template: src=app_supervisor.conf dest=/etc/supervisor/conf.d/{{ nsbase_supervisor_app_config }} template: src=app_supervisor.conf dest=/etc/supervisor/conf.d/{{ nsbase_app_supervisor_config }}
sudo: yes sudo: yes
notify: start supervisord notify: start supervisord

View File

@ -1,11 +1,11 @@
server { server {
server_name {{ nsbase_app_nginx_hostname }}; server_name {{ nsbase_app_hostname }};
access_log {{ nsbase_web_root_path }}/logs/nginx/{{ nsbase_app_name }}-access.log; access_log {{ nsbase_web_root_path }}/logs/nginx/{{ nsbase_app_name }}-access.log;
error_log {{ nsbase_web_root_path }}/logs/nginx/{{ nsbase_app_name }}-error.log info; error_log {{ nsbase_web_root_path }}/logs/nginx/{{ nsbase_app_name }}-error.log info;
location /static/ { location /static/ {
alias {{ nsbase_app_nginx_static_path }}; alias {{ nsbase_app_static_path }};
} }
location / { location / {

View File

@ -5,10 +5,10 @@
nsbase_web_user: "{{ ansible_env.SUDO_USER }}" nsbase_web_user: "{{ ansible_env.SUDO_USER }}"
# NGINX # NGINX
nsbase_nginx_app_config: "{{ nsbase_app_name }}_nginx.conf" nsbase_app_nginx_config: "{{ nsbase_app_name }}_nginx.conf"
# Supervisor # Supervisor
nsbase_supervisor_app_config: "{{ nsbase_app_name }}_supervisor.conf" nsbase_app_supervisor_config: "{{ nsbase_app_name }}_supervisor.conf"
# App specific configuration # App specific configuration
nsbase_app_service_name: "{{ nsbase_app_name }}" nsbase_app_service_name: "{{ nsbase_app_name }}"