Commit bc698c1f authored by jaywink's avatar jaywink

Allow disabling installation of postgresql database

parent 3934ef3d
......@@ -5,7 +5,7 @@ Ansible role - Socialhome
Deploy [Socialhome](https://github.com/jaywink/socialhome) using Ansible.
Role will also install Apache2 with a LetsEncrypt SSL certificate and a PostgreSQL database.
Role will also install Apache2 with a LetsEncrypt SSL certificate and by default a PostgreSQL database (this can be disabled).
Requirements
------------
......@@ -48,6 +48,11 @@ The following are required to use the role and have no (sane) defaults.
socialhome_email_host_password:
socialhome_email_from: "noreply@socialhome.local"
Disabling Postgres database installation
----------------------------------------
To instead use an existing postgresql database, define the variable `socialhome_db_install_postgres: false` and postgres install will be skipped.
Dependencies
------------
......
......@@ -2,6 +2,7 @@
socialhome_admin_name:
socialhome_admin_mail:
socialhome_daphne_port: 23564
socialhome_db_install_postgres: true
socialhome_db_host: 127.0.0.1
socialhome_db_name: socialhome
socialhome_db_password: socialhome
......
......@@ -4,6 +4,7 @@
- include: uwsgi.yaml
- include: apache.yaml
- include: postgresql.yaml
when: socialhome_db_install_postgres
- include: python.yaml
become_user: "{{ socialhome_os_user }}"
- include: circus.yaml
......
......@@ -11,8 +11,6 @@
- gettext
# Postgresql
- libpq-dev
- postgresql-9.3
- python-psycopg2
# Apache
- apache2
# uWSGI
......@@ -23,3 +21,10 @@
- python3-setuptools
# Redis
- redis-server
- name: Install postgres
apt: name={{ item }} state=present
with_items:
- postgresql-9.3
- python-psycopg2
when: socialhome_db_install_postgres
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