Commit 47345551 authored by Eric Pellegrini's avatar Eric Pellegrini

the mysql server is now a machine now instead of an ip

parent 9e1caeb6
......@@ -21,7 +21,7 @@
mysql_user: "{{ jupyterhub['mysql']['user'] }}"
mysql_password: "{{ jupyterhub['mysql']['password'] }}"
mysql_database: "{{ jupyterhub['mysql']['database'] }}"
mysql_bind_server: "{{ '127.0.0.1' if mysql['localhost'] else hostvars[jupyterhub['mysql']['bind_server']]['ansible_default_ipv4']['address'] }}"
mysql_bind_server: "{{ hostvars[jupyterhub['mysql']['bind_server']]['ansible_default_ipv4']['address'] if 'bind_server' in jupyterhub['mysql'] else '127.0.0.1' }}"
proxy_server: "{{ jupyterhub['proxy_server'] }}"
proxy_authentication_token: "{{ jupyterhub['proxy_authentication_token'] }}"
......@@ -11,6 +11,6 @@
- import_role:
name: roles/mysql
vars:
bind_address: "{{ '127.0.0.1' if mysql['localhost'] else hostvars[mysql['bind_server']]['ansible_default_ipv4']['address'] }}"
bind_address: "{{ hostvars[mysql['bind_server']]['ansible_default_ipv4']['address'] if 'bind_server' in mysql else '127.0.0.1' }}"
databases: "{{ mysql['databases'] }}"
users: "{{ mysql['users'] }}"
......@@ -144,9 +144,9 @@ c.OAuthenticator.client_id = "{{ client_id }}"
c.OAuthenticator.client_secret = "{{ client_secret }}"
{% if (proxy_server is defined) %}
c.OAuthenticator.oauth_callback_url = "http://%s/hub/oauth_callback" % "{{ proxy_server }}"
c.OAuthenticator.oauth_callback_url = "https://%s/hub/oauth_callback" % "{{ proxy_server }}"
{% else %}
c.OAuthenticator.oauth_callback_url = "http://%s:%s/hub/oauth_callback" % (c.JupyterHub.ip,c.JupyterHub.port)
c.OAuthenticator.oauth_callback_url = "https://%s:%s/hub/oauth_callback" % (c.JupyterHub.ip,c.JupyterHub.port)
{% endif %}
# Here are the jupyter infrastructure admins
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment