%PDF- %PDF-
| Direktori : /proc/self/root/proc/3522530/root/usr/lib/python2.7/site-packages/salt/states/ |
| Current File : //proc/self/root/proc/3522530/root/usr/lib/python2.7/site-packages/salt/states/postgres_initdb.pyo |
�
���^c @@ sP d Z d d l m Z m Z m Z d � Z d d d d d d d e d � Z d S( u�
Initialization of PostgreSQL data directory
===========================================
The postgres_initdb module is used to initialize the postgresql
data directory.
.. versionadded:: 2016.3.0
.. code-block:: yaml
pgsql-data-dir:
postgres_initdb.present:
- name: /var/lib/pgsql/data
- auth: password
- user: postgres
- password: strong_password
- encoding: UTF8
- locale: C
- runas: postgres
i ( t absolute_importt unicode_literalst print_functionc C@ s d t k r t d f St S( u5
Only load if the postgres module is present
u postgres.datadir_inituF Unable to load postgres module. Make sure `postgres.bins_dir` is set.( t __salt__t Falset True( ( ( s? /usr/lib/python2.7/site-packages/salt/states/postgres_initdb.pyt __virtual__ s
u passwordu UTF8c C@ s d j | � } i | d 6i d 6t d 6| d 6}
t d d | � st d ru d |
d <d j | � } | |
d <|
St d
| d | d | d
| d | d | d | d | � } t d | | � r� d j | � } | |
d <d |
d | <qd j | � } t |
d <| |
d <n |
S( uI
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
waldir
The transaction log (WAL) directory (default is to keep WAL
inside the data directory)
.. versionadded:: 2019.2.0
checksums
If True, the cluster will be created with data page checksums.
.. note:: Data page checksums are supported since PostgreSQL 9.3.
.. versionadded:: 2019.2.0
runas
The system user the operation should be performed on behalf of
u. Postgres data directory {0} is already presentu nameu changesu resultu commentu postgres.datadir_existst nameu testu4 Postgres data directory {0} is set to be initializedt usert passwordt autht encodingt localet waldirt checksumst runasu postgres.datadir_initu0 Postgres data directory {0} has been initializedu Presentu1 Postgres data directory {0} initialization failedN( t formatR R t __opts__t Nonet dictR ( R R R R
R R R R
R t _cmtt rett kwargs( ( s? /usr/lib/python2.7/site-packages/salt/states/postgres_initdb.pyt present$ s@ .
N( t __doc__t
__future__R R R R R R R ( ( ( s? /usr/lib/python2.7/site-packages/salt/states/postgres_initdb.pyt <module> s