%PDF- %PDF-
Direktori : /proc/227033/root/lib/python2.7/site-packages/salt/modules/ |
Current File : //proc/227033/root/lib/python2.7/site-packages/salt/modules/deb_postgres.pyc |
� ���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l m Z e j e � Z d Z d � Z d d d d d d � Z e d � Z d d � Z d e d � Z d � Z d S( uU Module to provide Postgres compatibility to salt for debian family specific tools. i ( t absolute_importt print_functiont unicode_literalsN( t sixu postgresc C@ s# t j j j d � r t St d f S( uB Only load this module if the pg_createcluster bin exists u pg_createclusteruH postgres execution module not loaded: pg_createcluste command not found.( t saltt utilst patht whicht __virtualname__t False( ( ( s= /usr/lib/python2.7/site-packages/salt/modules/deb_postgres.pyt __virtual__ s u mainc C@ s t j j j d � g } | r: | d t j | � g 7} n | rS | d | g 7} n | rl | d | g 7} n | r� | d | g 7} n | | | g 7} d j g | D] } t j | � ^ q� � } t d | d t �} | j d d � d k rt j d j | | � � t S| S( uI Adds a cluster to the Postgres server. .. warning: Only works for debian family distros so far. CLI Example: .. code-block:: bash salt '*' postgres.cluster_create '9.3' salt '*' postgres.cluster_create '9.3' 'main' salt '*' postgres.cluster_create '9.3' locale='fr_FR' u pg_createclusteru --portu --localeu --encodingu --datadiru u cmd.run_allt python_shellu retcodei u+ Error creating a Postgresql cluster {0}/{1}( R R R R R t text_typet joint pipest quotet __salt__R t gett logt errort format( t versiont namet portt localet encodingt datadirt cmdt ct cmdstrt ret( ( s= /usr/lib/python2.7/site-packages/salt/modules/deb_postgres.pyt cluster_create s"