%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/logrotate.pyo

�
���^c@@spdZddlmZmZmZddlmZdZdZidd6Z	d�Z
d	�Zded
�Z
dS(u=
Module for managing logrotate.

.. versionadded:: 2017.7.0

i(tabsolute_importtprint_functiontunicode_literals(tsixu/etc/logrotate.confu	logrotateusetuset_cC@sdtkrtStS(u>
    Load only on minions that have the logrotate module.
    ulogrotate.show_conf(t__salt__t__virtualname__tFalse(((s9/usr/lib/python2.7/site-packages/salt/states/logrotate.pyt__virtual__scC@s1yttj|��}Wntk
r,nX|S(u�
    Convert to an int if necessary.

    :param str value: The value to check/convert.

    :return: The converted or passed value.
    :rtype: bool|int|str
    (tintRt	text_typet
ValueError(tvalue((s9/usr/lib/python2.7/site-packages/salt/states/logrotate.pyt_convert_if_int#s
	
c	C@s�i|d6t�d6tj�d6dd6}yK|dkrVtdd|d|�}ntdd|d|d|�}Wnttfk
r�t}nX|dkr�t|�}||kr�d	j	||�|d<t
|d<n�td
rdj	||�|d<i|d6|d
6|d<nti|d6|d
6|d<tdd|d|d|�|d<|drvdj	||�|d<ndj	||�|d<|St|�}||kr�dj	|||�|d<t
|d<n�td
rdj	|||�|d<i|d6|d
6|d<n�i|d6|d
6|d<tdd|d|d|d|�|d<|drsdj	|||�|d<ndj	|||�|d<|S(u3
    Set a new value for a specific configuration line.

    :param str key: The command or block to configure.
    :param str value: The command value or command of the block specified by the key parameter.
    :param str setting: The command value for the command specified by the value parameter.
    :param str conf_file: The logrotate configuration file.

    Example of usage with only the required arguments:

    .. code-block:: yaml

        logrotate-rotate:
          logrotate.set:
            - key: rotate
            - value: 2

    Example of usage specifying all available arguments:

    .. code-block:: yaml

        logrotate-wtmp-rotate:
          logrotate.set:
            - key: /var/log/wtmp
            - value: rotate
            - setting: 2
            - conf_file: /etc/logrotate.conf
    unameuchangesucommenturesultu
logrotate.gettkeyt	conf_fileRu$Command '{0}' already has value: {1}utestu'Command '{0}' will be set to value: {1}uoldunewu
logrotate.setuSet command '{0}' value: {1}u&Unable to set command '{0}' value: {1}u0Block '{0}' command '{1}' already has value: {2}u3Block '{0}' command '{1}' will be set to value: {2}tsettingu(Set block '{0}' command '{1}' value: {2}u2Unable to set block '{0}' command '{1}' value: {2}N(tdictRR	tNoneRtAttributeErrortKeyErrorRRtformattTruet__opts__(tnameR
RRRtrett
current_value((s9/usr/lib/python2.7/site-packages/salt/states/logrotate.pytset_3sT



#




#






N(t__doc__t
__future__RRRtsalt.extRt
_DEFAULT_CONFRt__func_alias__RRRR(((s9/usr/lib/python2.7/site-packages/salt/states/logrotate.pyt<module>s
			

Zerion Mini Shell 1.0