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
- allow_group_access: True
- data_checksums: True
- wal_segsize: 32
salt.states.postgres_initdb.
present
(name, user=None, password=None, auth='password', encoding='UTF8', locale=None, runas=None, waldir=None, checksums=False)¶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 transaction log (WAL) directory (default is to keep WAL inside the data directory)
New in version 2019.2.0.
If True, the cluster will be created with data page checksums.
Note
Data page checksums are supported since PostgreSQL 9.3.
New in version 2019.2.0.
The system user the operation should be performed on behalf of