Once the groups and users are set up in the PostgreSQL database, it is then time to configure some databases and extensions. In this recipe, we will learn how to configure databases and extensions, and relate them with the groups and users we have already configured.
We will use the same minion as the previous recipe.
/opt/salt-cookbook/staging/postgresql/database.slsto have the following entries:
include: - postgresql.users postgres_staging_db: postgres_database.present: - name: stagingdb - owner: stgdb - require: - postgres_user: postgres_db_user
/opt/salt-cookbook/staging/top.slsto have the following entries:
staging: '*': - postgresql.database