%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/apache.pyc

�
���^c@�sbdZddlmZmZmZmZddlZddlZddl	Zd�Z
d�ZdS(uM

Apache state

.. versionadded:: 2014.7.0

Allows for inputting a yaml dictionary into a file for apache configuration
files.

The variable ``this`` is special and signifies what should be included with
the above word between angle brackets (<>).

.. code-block:: yaml

    /etc/httpd/conf.d/website.com.conf:
      apache.configfile:
        - config:
          - VirtualHost:
              this: '*:80'
              ServerName:
                - website.com
              ServerAlias:
                - www.website.com
                - dev.website.com
              ErrorLog: logs/website.com-error_log
              CustomLog: logs/website.com-access_log combined
              DocumentRoot: /var/www/vhosts/website.com
              Directory:
                this: /var/www/vhosts/website.com
                Order: Deny,Allow
                Deny from: all
                Allow from:
                  - 127.0.0.1
                  - 192.168.100.0/24
                Options:
                  - Indexes
                  - FollowSymlinks
                AllowOverride: All

.. versionchanged:: 2018.3

Allows having the same section container multiple times (e.g. <Directory /path/to/dir>).

YAML structure stays the same only replace dictionary with a list.

When a section container does not have mandatory attribute, such as <Else>,
it still needs keyword ``this`` with empty string (or "" if nicer output is required - without space).

.. code-block:: yaml

    /etc/httpd/conf.d/website.com.conf:
      apache.configfile:
        - config:
          - VirtualHost:
              - this: '*:80'
              - ServerName:
                - website.com
              - DocumentRoot: /var/www/vhosts/website.com
              - Directory:
                  this: /var/www/vhosts/website.com
                  Order: Deny,Allow
                  Deny from: all
                  Allow from:
                    - 127.0.0.1
                    - 192.168.100.0/24
                  Options:
                    - Indexes
                    - FollowSymlinks
                  AllowOverride: All
              - Directory:
                - this: /var/www/vhosts/website.com/private
                - Order: Deny,Allow
                - Deny from: all
                - Allow from:
                  - 127.0.0.1
                  - 192.168.100.0/24
                - If:
                    this: some condition
                    do: something
                - Else:
                    this:
                    do: something else
                - Else:
                    this: ""
                    do: another thing
i(tabsolute_importtwith_statementtprint_functiontunicode_literalsNcC�s
dtkS(Nu
apache.config(t__salt__(((s6/usr/lib/python2.7/site-packages/salt/states/apache.pyt__virtual__bsc	C�s�i|d6id6dd6dd6}td||dt�}d}tjj|�r�tjjj	|��"}tjj
j|j��}WdQXn|j
�|j
�kr�t|d<d|d<|Std	r�d
|d<i|d6|d6|d<d|d<|Syptjjj	|d
��&}ttjj
j|�d|�WdQXi|d6|d6|d<t|d<d|d<Wn'tk
r�}t|d<d|d<nX|S(Nunameuchangesuresultuucommentu
apache.configtedituConfiguration is up to date.utestuConfiguration will update.uoldunewuwtfileu#Successfully created configuration.u&Failed to create apache configuration.(tNoneRtFalsetostpathtexiststsalttutilstfilestfopentstringutilst
to_unicodetreadtstriptTruet__opts__tprinttto_strt	Exception(tnametconfigtrettconfigstcurrent_configstconfig_filetexc((s6/usr/lib/python2.7/site-packages/salt/states/apache.pyt
configfilefs@

$




%

(t__doc__t
__future__RRRRR
tsalt.utils.filesR
tsalt.utils.stringutilsRR!(((s6/usr/lib/python2.7/site-packages/salt/states/apache.pyt<module>Vs"	

Zerion Mini Shell 1.0