Skip to content

Move DB creation from st2mistral to postgresql role #95

@arm4b

Description

@arm4b

Since we have own postgresql role, - let it handle DB creation for st2mistral.

Use native Ansible modules postgresql_user and postgresql_db instead of init_mistral_db SQL template file.

So after all postgresql + st2mistral usage should look as following:

- name: Install st2mistral on a single node
  hosts: all
  roles:
    - name: Install PostgreSQL and configure databases
      role: postgresql
      vars:
        postgresql_databases:
          - name: "{{ st2mistral_db }}"
        postgresql_users:
          - name: "{{ st2mistral_db_username }}"
            pass: "{{ st2mistral_db_password }}"
            encrypted: yes

    - name: Install and configure StackStorm Mistral
      role: st2mistral
      vars:
        st2mistral_database_connection: postgresql://{{ st2mistral_db_username }}:{{ st2mistral_db_password }}@localhost/{{ st2mistral_db }}

Use best practices from https://github.com/ANXS/postgresql

Additionally, this will allow us to manage multi-node deployments #17 better in future.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions