diff --git a/group_vars/constellation-front.yml b/group_vars/constellation-front.yml new file mode 100644 index 0000000000000000000000000000000000000000..e621e946bb09d8cfecb2d17777911bf8f89c371a --- /dev/null +++ b/group_vars/constellation-front.yml @@ -0,0 +1,30 @@ +--- +loc_nginx: + service_name: constellation + ssl: [] + servers: + - ssl: false + default: true + server_name: + - "constellation.crans.org" + - "intranet.crans.org" + locations: + - filter: "/static" + params: + - "alias /var/local/constellation/static/" + + - filter: "/javascript" + params: + - "alias /usr/share/javascript/" + + - filter: "/media" + params: + - "alias /var/local/constellation/media/" + + - filter: "/" + params: + - "uwsgi_pass constellation" + - "include /etc/nginx/uwsgi_params" + upstreams: + - name: 'constellation' + server: 'unix:///var/run/uwsgi/app/constellation/constellation.sock' diff --git a/group_vars/constellation.yml b/group_vars/constellation.yml index 76cd299a1c548569cca5f7a41c632ea3152c71f1..e3ace5a716ac6012dc4d3866050cf26d8eca7860 100644 --- a/group_vars/constellation.yml +++ b/group_vars/constellation.yml @@ -40,33 +40,3 @@ glob_constellation: version: master settings_local_owner: www-data settings_local_group: nounou - -loc_nginx: - service_name: constellation - ssl: [] - servers: - - ssl: false - default: true - server_name: - - "constellation.crans.org" - - "intranet.crans.org" - locations: - - filter: "/static" - params: - - "alias /var/local/constellation/static/" - - - filter: "/javascript" - params: - - "alias /usr/share/javascript/" - - - filter: "/media" - params: - - "alias /var/local/constellation/media/" - - - filter: "/" - params: - - "uwsgi_pass constellation" - - "include /etc/nginx/uwsgi_params" - upstreams: - - name: 'constellation' - server: 'unix:///var/run/uwsgi/app/constellation/constellation.sock' diff --git a/hosts b/hosts index c628b91ee4844b77f0162b74cfad6f374e66d101..89a58973adfb40fc642b8291cce1784efb4f5d8d 100644 --- a/hosts +++ b/hosts @@ -45,7 +45,10 @@ reverseproxy thelounge vsftpd -[constellation] +[constellation:children] +constellation-front + +[constellation-front] constellation-dev.adm.crans.org [dhcp:children] @@ -139,7 +142,7 @@ eclat.adm.crans.org ptf.adm.crans.org [nginx:children] -constellation +constellation-front django_cas galene jitsi diff --git a/plays/constellation.yml b/plays/constellation.yml index 64f7c64dbe1ec38223522b6f2eca4b94f63ec7c1..3a1d5fede82def81b79be7f5cb2154b4925c4fbb 100755 --- a/plays/constellation.yml +++ b/plays/constellation.yml @@ -3,8 +3,13 @@ - hosts: constellation vars: constellation: "{{ glob_constellation | combine(loc_constellation | default({}), recursive=True) }}" - nginx: "{{ glob_nginx | combine(loc_nginx | default({})) }}" roles: - constellation + +- hosts: constellation-front + vars: + constellation: "{{ glob_constellation | combine(loc_constellation | default({}), recursive=True) }}" + nginx: "{{ glob_nginx | combine(loc_nginx | default({})) }}" + roles: - nginx - constellation-front diff --git a/roles/constellation-front/handlers/main.yml b/roles/constellation-front/handlers/main.yml index bc651bf93bfeae0e3a67733d34d0f439924c98d2..2b15eaea7a865438499e2b1ff6d2c53ce6ce7f38 100644 --- a/roles/constellation-front/handlers/main.yml +++ b/roles/constellation-front/handlers/main.yml @@ -1,9 +1,4 @@ --- -- name: Reload NGINX - systemd: - name: nginx - state: reloaded - - name: Reload uWSGI systemd: name: uwsgi