diff --git a/defaults/main.yml b/defaults/main.yml index e6ca256..6d8cc5e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -10,4 +10,4 @@ nsbase_app_root_path: "{{ nsbase_web_root_path }}/{{ nsbase_app_name }}_webapp" # NGINX 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/" diff --git a/tasks/nginx.yaml b/tasks/nginx.yaml index 7c3a1f8..205d897 100644 --- a/tasks/nginx.yaml +++ b/tasks/nginx.yaml @@ -4,13 +4,13 @@ sudo: yes - 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 - name: link to enable nginx configuration file: state=link - src=/etc/nginx/sites-available/{{ nsbase_nginx_app_config }} - path=/etc/nginx/sites-enabled/{{ nsbase_nginx_app_config }} + src=/etc/nginx/sites-available/{{ nsbase_app_nginx_config }} + path=/etc/nginx/sites-enabled/{{ nsbase_app_nginx_config }} sudo: yes - name: disable default configuration diff --git a/tasks/supervisor.yaml b/tasks/supervisor.yaml index 43a2a58..78a60de 100644 --- a/tasks/supervisor.yaml +++ b/tasks/supervisor.yaml @@ -20,6 +20,6 @@ sudo: yes - 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 notify: start supervisord diff --git a/templates/app_nginx.conf b/templates/app_nginx.conf index 95497d6..31ba803 100644 --- a/templates/app_nginx.conf +++ b/templates/app_nginx.conf @@ -1,11 +1,11 @@ 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; error_log {{ nsbase_web_root_path }}/logs/nginx/{{ nsbase_app_name }}-error.log info; location /static/ { - alias {{ nsbase_app_nginx_static_path }}; + alias {{ nsbase_app_static_path }}; } location / { diff --git a/vars/main.yml b/vars/main.yml index da63d88..5011f92 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -5,10 +5,10 @@ nsbase_web_user: "{{ ansible_env.SUDO_USER }}" # NGINX -nsbase_nginx_app_config: "{{ nsbase_app_name }}_nginx.conf" +nsbase_app_nginx_config: "{{ nsbase_app_name }}_nginx.conf" # Supervisor -nsbase_supervisor_app_config: "{{ nsbase_app_name }}_supervisor.conf" +nsbase_app_supervisor_config: "{{ nsbase_app_name }}_supervisor.conf" # App specific configuration nsbase_app_service_name: "{{ nsbase_app_name }}"