Module to provide Postgres compatibility to salt.
configuration: | 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'
This data can also be passed into pillar. Options passed into opts will overwrite options passed into pillar |
---|
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 dictionary with information about databases of a Postgres server.
CLI Example:
salt '*' postgres.db_list
Removes a databases from the Postgres server.
CLI Example:
salt '*' postgres.db_remove 'dbname'
Creates a Postgres group. A group is postgres is similar to a user, but cannot login.
CLI Example:
salt '*' postgres.group_create 'groupname' user='user' host='hostname' port='port' password='password'
Removes a group from the Postgres server.
CLI Example:
salt '*' postgres.group_remove 'groupname'
Updated a postgres group
CLI Examples:
salt '*' postgres.group_update 'username' user='user' host='hostname' port='port' password='password'
Creates a Postgres user.
CLI Examples:
salt '*' postgres.user_create 'username' user='user' host='hostname' port='port' password='password'
Checks if a user exists on the Postgres server.
CLI Example:
salt '*' postgres.user_exists 'username'
Return a dict with information about users of a Postgres server.
CLI Example:
salt '*' postgres.user_list
Removes a user from the Postgres server.
CLI Example:
salt '*' postgres.user_remove 'username'
Creates a Postgres user.
CLI Examples:
salt '*' postgres.user_create 'username' user='user' host='hostname' port='port' password='password'
Return the version of a Postgres server.
CLI Example:
salt '*' postgres.version