From adba801f21b55d7040cd4807f84796bb5898d0ae Mon Sep 17 00:00:00 2001 From: Elias Date: Fri, 9 Feb 2018 11:30:48 +0100 Subject: [PATCH] Postgresql user fix and documentation --- README.rst | 21 ++++++++++++++------- roles/base/tasks/main.yml | 4 ++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 5ca5789..7a2fcd7 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ -Dev install of publik -===================== +Development configuration for publik +==================================== Ansible playbook that install and setup a multitenant publik instance using sources. @@ -19,12 +19,19 @@ Install dependencies System requirements +++++++++++++++++++ - * postgresql server must be installed - * the system user used to run ansible must be a sudoer - * the system user used to run ansible must to be able to connect to the postgres server withpout authentication and must be authorized to create databases - * you need to have a valid SSL certificate ('ssl_certificate' and 'ssl_certificate_key' in configuration file) +* postgresql server must be installed +* the system user used to run ansible must be a sudoer +* configure postgresql in order to have these configuration: + + * the system user is used to run ansible and must to be able to connect to the postgresql server without authentication and must be authorized to create databases + * postgresql must have a postgres user authorized to connect and create a db. + * please edit /etc/postgresql/[INSTALLED VERSION]/main/pg_hba.conf and add these lines: + +.. code-block:: configuration + + local all postgres trust + local all all peer - Description =========== diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index 12ab0df..6124960 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -19,6 +19,10 @@ - supervisor become: yes +- name: "create the postgresql user named {{user}}" + postgresql_user: + name: "{{user}}" + - name: create the virtualenv and install django pip: name: django -- 2.14.1