From 18b6f3a7c5d2faf4240ae7e594b1adde97775af4 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 18 May 2021 08:41:52 +0100 Subject: [PATCH] Use a local MySQL database [ci skip] --- tools/deployment/provision.yml | 1 + tools/deployment/vars/provision_vars.yml | 11 +++++++-- tools/deployment/vars/provision_vault.yml | 28 ++++++++++------------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/tools/deployment/provision.yml b/tools/deployment/provision.yml index 7a00087..7fef500 100644 --- a/tools/deployment/provision.yml +++ b/tools/deployment/provision.yml @@ -10,6 +10,7 @@ - name: geerlingguy.firewall - name: geerlingguy.security - name: geerlingguy.certbot + - name: geerlingguy.mysql - name: geerlingguy.nginx - name: geerlingguy.php-versions - name: geerlingguy.php diff --git a/tools/deployment/vars/provision_vars.yml b/tools/deployment/vars/provision_vars.yml index 1e05706..d5743dc 100644 --- a/tools/deployment/vars/provision_vars.yml +++ b/tools/deployment/vars/provision_vars.yml @@ -23,9 +23,16 @@ app_mysql_port: '{{ vault_app_mysql_port }}' app_mysql_user: '{{ vault_app_mysql_user }}' mysql_packages: - - mysql-client + - mariadb-client + - mariadb-server - python3-mysqldb -mysql_users: [] +mysql_databases: + - name: "{{ app_mysql_database }}" +mysql_users: + - name: "{{ app_mysql_user }}" + host: "{{ app_mysql_host }}" + password: "{{ app_mysql_password }}" + priv: "{{ app_mysql_database }}.*:ALL" nginx_remove_default_vhost: true nginx_server_tokens: 'off' diff --git a/tools/deployment/vars/provision_vault.yml b/tools/deployment/vars/provision_vault.yml index cc7c92b..e92530b 100644 --- a/tools/deployment/vars/provision_vault.yml +++ b/tools/deployment/vars/provision_vault.yml @@ -1,17 +1,13 @@ $ANSIBLE_VAULT;1.1;AES256 -38643961326665613966373635633766616361643263616137396238663431656462636166393631 -3635306262613533623337353730633434363364316361370a346333363738346430306539323133 -66396266643832323630666334343664303438613566373266353236333233323166643435663561 -6566623833343630350a396564333262633266636563663266613334303531393065303865343765 -64353365636565373238613130356262613535363165646535346664643536313238366331636636 -65613261663461323230656235356535393763653539386362356639616332376339326232643465 -31393436343264316539633761636334343030636136646135313863326363326539383936353063 -35323963626138386138316264303635376561353135386639353466663630633637326237346336 -34306335653039316239663233616331343365336331393030306631666161666334326161326335 -35353061303561626130613932356132626566353037313266626138663138343939396530313364 -38666631363665326561323333326537623032333763363231653866613935636633353437633134 -35623534386133363639346235356634313164656335366663326436336165643266366236626238 -33306664613638323832373535376565393063336234633035663961306635363432663431613531 -35346663616366653432633865663162353934376362363064303163366237663161353838373837 -61353463656437303561333537303835323239613232663761323136326266666263396363376262 -30646164353262316438 +35313932386434613239666536313138663330333966363564646632363137356532393666646164 +6131646339333564306439653762623833366539346434350a393762636430636565653362646462 +61303239363630313839633164613865363465383831643737666133353730653962643362613538 +3162626335353336620a383938633336303137633165643337303539326131633863393839393835 +31366436316333306161616133373366386261643736383731383165633336633030373830623236 +30393334316264653863623963333033626638373764353963323332313366346462316535396235 +61363634313936656539303934323231613434396264396464626163616434643263666533356630 +65363332323563653662626435326333666431626162666365663166636636653137626166336433 +62353131326438643464633135393733613432333731386365393138353430633561616366663130 +38343936383164326632376636653436666561303063363334303638363564643533326331666564 +63666434633664303330323962623930386262343931333932393333376535353261313337636634 +35323839613162363330