salt.states.postgres_initdb

Initialization of PostgreSQL data directory

The postgres_initdb module is used to initialize the postgresql data directory.

New in version 2016.3.0.

pgsql-data-dir:
  postgres_initdb.present:
    - name: /var/lib/pgsql/data
    - auth: password
    - user: postgres
    - password: strong_password
    - encoding: UTF8
    - locale: C
    - runas: postgres
salt.states.postgres_initdb.present(name, user=None, password=None, auth=u'password', encoding=u'UTF8', locale=None, runas=None)

Initialize the PostgreSQL data directory

name
The name of the directory to initialize
user
The database superuser name
password
The password to set for the postgres user
auth
The default authentication method for local connections
encoding
The default encoding for new databases
locale
The default locale for new databases
runas
The system user the operation should be performed on behalf of