Ansible: deploy Django portal to simvascular server with its own local database
diff --git a/dev-tools/ansible/inventories/scigap/production/host_vars/simvascular/vars.yml b/dev-tools/ansible/inventories/scigap/production/host_vars/simvascular/vars.yml
index f1896f0..3c9195f 100644
--- a/dev-tools/ansible/inventories/scigap/production/host_vars/simvascular/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/production/host_vars/simvascular/vars.yml
@@ -26,9 +26,10 @@
 # configure user_data_dir and real_user_data_dir
 user_data_dir: "/var/www/portals/gateway-user-data"
 real_user_data_dir: "/home/www-shared/gateway-user-data"
-# TODO: until we can fix the networking issue between simvascular.stanford.edu
-# and scigap01, we'll just use a sqlite database
-django_database_backend: "sqlite3"
+django_database_host_ip_address: "localhost"
+django_database_hosts:
+  # Database is installed on the same host as the Django server
+  - simvascular
 
 vhost_servername: "new.django.simvascular.scigap.org"
 vhost_ssl: True
@@ -37,7 +38,6 @@
 ssl_certificate_key_file: "/etc/letsencrypt/live/{{ vhost_servername }}/privkey.pem"
 
 django_file_upload_max_file_size_mb: 2000
-django_pga_url: "https://gateway.simvascular.org"
 
 ## Keycloak related variables
 tenant_domain: "simvascular"
diff --git a/dev-tools/ansible/inventories/scigap/production/host_vars/simvascular/vault.yml b/dev-tools/ansible/inventories/scigap/production/host_vars/simvascular/vault.yml
index aecdd17..929364c 100644
--- a/dev-tools/ansible/inventories/scigap/production/host_vars/simvascular/vault.yml
+++ b/dev-tools/ansible/inventories/scigap/production/host_vars/simvascular/vault.yml
@@ -1,15 +1,18 @@
 $ANSIBLE_VAULT;1.1;AES256
-33323735346138626633386636373833613861656535663834366466343266666239626466623062
-6237336437386537613964613233313965343632386430310a303532646239633533333631636236
-34333630363961663936663037643362316262386330313935666634653062623937356234306662
-3766366539316437300a633165313136623366663561633961383138626161333962303633363134
-31666430633339353838313931616164613832663031643939336339326135623761343264356430
-35363264326334623761643363386539326461303338633862333239363561326137616166376162
-39353837653565343837663063363330386538353334666162663838616263306364396339346338
-65303761376431313865323534656639346365633265303639396465656334636139383434626365
-31616430666437323162343135316435306231646630323364353962316135643262343634386530
-65663439643333393534343233343463356635323738383930613064633032333664386631383033
-66316165633930643664363531346164616632353533393436623230626162373965313366313832
-66633963613134366539306166343339623136336132373138353435613435326132663332373065
-38306164623938303133303866616231666136313434333835663264373536363663636538646536
-6134613564643561346338633932313739623431333530613465
+39656265613239336132643464393439353834333938363462333835356235613837366431376435
+3661323464643837663338623333386132666534663031320a666134633334663333663035646366
+64653734663437613361613736396565393162663465666133323530613166613165366130333961
+3264336232666161630a393064356331346566646261393939373730356635353063643138373761
+33393866383935383837306565343830306564346165666361303036353566303639306365666465
+35323135356433656663663166653936373433663039313464346530643837303235663030393934
+38326436336137393035616238333764383939393234366131383836316565343134323734626665
+38313139633032643338336431623436623333353832323936303035393535656436643036663731
+39343638333938386239323035356561646236323366333331363966613731333332333237633431
+39366535613037343334356338373439356234656139383339346537323363323835333433623266
+36373734636533376566613032326363336332306438363536636265336339336264346664643038
+65373431393164386561376565313862313866316334326333633263626365663731323035353363
+62646230343664316366323961353566356334356332306661646235653938366562313935396363
+65643261343335663333663538323335366265386564346164346662353832643763336438646362
+66653963343961303264363033663635656161363130343762346235326632353333396630323732
+37383630653133386266386332356631663932643365646330616436323366373439653365343134
+61336161616566356433386636376130316563396662623063303364323935313730
diff --git a/dev-tools/ansible/roles/django/tasks/database.yml b/dev-tools/ansible/roles/django/tasks/database.yml
index 964f8b0..4589562 100644
--- a/dev-tools/ansible/roles/django/tasks/database.yml
+++ b/dev-tools/ansible/roles/django/tasks/database.yml
@@ -20,6 +20,16 @@
 
 ---
 
+- name: Adds Python MySQL support on Debian/Ubuntu
+  apt: pkg="python-mysqldb" state=present
+  become_user: root
+  when: ansible_os_family == 'Debian'
+
+- name: Adds Python MySQL support on RedHat/CentOS
+  yum: name=MySQL-python state=present
+  become_user: root
+  when: ansible_os_family == 'RedHat'
+
 - name: create django database ({{ django_database_name }})
   mysql_db: name="{{ django_database_name }}" state=present encoding=utf8 collation=utf8_bin