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='password', encoding='UTF8', locale=None, runas=None)¶Initialize the PostgreSQL data directory
The name of the directory to initialize
The database superuser name
The password to set for the postgres user
The default authentication method for local connections
The default encoding for new databases
The default locale for new databases
The system user the operation should be performed on behalf of