The postgres_initdb module is used to initialize the postgresql data directory.
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