O'Reilly logo

Salt Cookbook by Anirban Saha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting up PostgreSQL groups and users

After setting up our PostgreSQL environment, the next important task is to set up the authentication process for users and groups. In this recipe, you will learn how to create groups and users in PostgreSQL database.

How to do it...

We will use the same minion as the previous recipe.

  1. Create and edit /opt/salt-cookbook/staging/postgresql/users.sls to have the following entries:
    postgres_db_grp: postgres_group.present: - name: stggrp - login: True postgres_db_user: postgres_user.present: - name: stgdb - password: {{ pillar['postgresql']['passwd'] }} - encrypted: True - groups: stggrp - require: - postgres_group: postgres_db_grp postgres_admin_user: postgres_user.present: - name: stgadmin - password: {{ pillar['postgresql']['passwd'] ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required