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

Using PostgreSQL packages, files, and services

PostgreSQL is an extremely important relational database solution, and it has made its way into lot of important infrastructure setups and organizations. In this recipe, you will learn how to configure PostgreSQL by installing the respective packages, setting up the proper configuration file, and configuring the database service.

How to do it...

  1. Configure a new minion in the staging environment called salt-minion-postgresql.
  2. Create a new state directory in the staging environment called postgresql, and create a directory called files in this directory.
  3. Create and edit /opt/salt-cookbook/staging/postgresql/init.sls to have the following entries:
    pg_repo_pkg: pkg.installed: - sources: - pgdg-centos94: http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg- ...

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