Module to provide Postgres compatibility to salt.
In order to connect to Postgres, certain configuration is required in /etc/salt/minion on the relevant minions. Some sample configs might look like:
postgres.host: 'localhost'
postgres.port: '5432'
postgres.user: 'postgres'
postgres.pass: ''
postgres.db: 'postgres'
Members
Simple convienence function for modules to use for gracefully blowing up if a required tool is not available in the system path.
Lazily import salt.modules.cmdmod to avoid any sort of circular dependencies.
Adds a databases to the Postgres server.
CLI Example:
salt '*' postgres.db_create 'dbname'
salt '*' postgres.db_create 'dbname' template=template_postgis
Checks if a database exists on the Postgres server.
CLI Example:
salt '*' postgres.db_exists 'dbname'
Return a list of databases of a Postgres server using the output from the psql -l query.
CLI Example:
salt '*' postgres.db_list
Removes a databases from the Postgres server.
CLI Example:
salt '*' postgres.db_remove 'dbname'