%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/states/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/states/postgres_initdb.pyo

�
���^c	@@sPdZddlmZmZmZd�Zddddddded�ZdS(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(tabsolute_importtunicode_literalstprint_functioncC@sdtkrtdfStS(u5
    Only load if the postgres module is present
    upostgres.datadir_inituFUnable to load postgres module.  Make sure `postgres.bins_dir` is set.(t__salt__tFalsetTrue(((s?/usr/lib/python2.7/site-packages/salt/states/postgres_initdb.pyt__virtual__s
upassworduUTF8c	C@sdj|�}	i|d6id6td6|	d6}
tdd|�stdrud|
d<d	j|�}	|	|
d<|
Std
|d|d|d
|d|d|d|d|�}td||�r�dj|�}	|	|
d<d|
d|<qdj|�}	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 presentunameuchangesuresultucommentupostgres.datadir_existstnameutestu4Postgres data directory {0} is set to be initializedtusertpasswordtauthtencodingtlocaletwaldirt	checksumstrunasupostgres.datadir_initu0Postgres data directory {0} has been initializeduPresentu1Postgres data directory {0} initialization failedN(tformatRRt__opts__tNonetdictR(RRR	R
RRRR
Rt_cmttrettkwargs((s?/usr/lib/python2.7/site-packages/salt/states/postgres_initdb.pytpresent$s@.


	
		
	

N(	t__doc__t
__future__RRRRRRR(((s?/usr/lib/python2.7/site-packages/salt/states/postgres_initdb.pyt<module>s	


Zerion Mini Shell 1.0