The postgres_database module is used to create and manage Postgres databases. Databases can be set as either absent or present
frank:
postgres_database.present
salt.states.postgres_database.
absent
(name, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None)¶Ensure that the named database is absent
System user all operations should be performed on behalf of
New in version 0.17.0.
salt.states.postgres_database.
present
(name, tablespace=None, encoding=None, lc_collate=None, lc_ctype=None, owner=None, owner_recurse=False, template=None, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None)¶Ensure that the named database is present with the specified properties. For more information about all of these options see man createdb(1)
Database port if different from config or default
New in version 0.17.0.
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 2016.3.0
salt.states.postgres_cluster module