Skip to content
Snippets Groups Projects
Commit 7930b947 authored by Felix Schäfer's avatar Felix Schäfer :construction_worker:
Browse files

Simplify using a non-local DB

parent e09c567d
No related branches found
No related tags found
No related merge requests found
Pipeline #8939 failed
......@@ -20,14 +20,6 @@
path: /srv/AKPlanning/AKPlanning/settings_production.py
register: akplanning_settings
- name: Set the original db host so we can update # noqa 208
lineinfile:
path: /srv/AKPlanning/AKPlanning/settings_production.py
line: " 'HOST': 'localhost',"
regexp: "^ 'HOST':"
when: akplanning_settings.stat.exists
notify: restart akplanning
- name: Clone AKPlanning
git:
repo: https://gitlab.fachschaften.org/kif/akplanning.git
......@@ -83,13 +75,6 @@
group: django
notify: restart akplanning
- name: Set the correct db host # noqa 208
lineinfile:
path: /srv/AKPlanning/AKPlanning/settings_production.py
line: " 'HOST': '{{ hostvars[akplanning_mariadb_host]['ansible_default_ipv4']['address'] }}',"
regexp: "^ 'HOST':"
notify: restart akplanning
- name: AKPlanning migrate and stuff
shell: |
. /srv/AKPlanning/venv/bin/activate
......
......@@ -7,3 +7,5 @@ DB_NAME = '{{ akplanning_mariadb_user }}'
DB_USER = '{{ akplanning_mariadb_user }}'
DB_PASSWORD = '{{ akplanning_mariadb_pass }}'
DB_HOST = '{{ hostvars[akplanning_mariadb_host]['ansible_default_ipv4']['address'] }}'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment