%PDF- %PDF-
| Direktori : /proc/self/root/proc/self/root/usr/lib/python2.7/site-packages/salt/states/ |
| Current File : //proc/self/root/proc/self/root/usr/lib/python2.7/site-packages/salt/states/alias.pyo |
�
���^c @@ s8 d Z d d l m Z m Z m Z d � Z d � Z d S( uH
Configuration of email aliases
The mail aliases file can be managed to contain definitions for specific email
aliases:
.. code-block:: yaml
username:
alias.present:
- target: user@example.com
.. code-block:: yaml
thomas:
alias.present:
- target: thomas@example.com
The default alias file is set to ``/etc/aliases``, as defined in Salt's
:mod:`config execution module <salt.modules.config>`. To change the alias
file from the default location, set the following in your minion config:
.. code-block:: yaml
aliases.file: /my/alias/file
i ( t absolute_importt print_functiont unicode_literalsc C@ s� i | d 6i d 6t d 6d d 6} t d | | � rV t | d <d j | � | d <| St d r� d | d <d j | | � | d <| St d
| | � r� i | d 6| d <t | d <d j | | � | d <| St | d <d
j | | � | d <| Sd S( up
Ensures that the named alias is present with the given target or list of
targets. If the alias exists but the target differs from the previous
entry, the target(s) will be overwritten. If the alias does not exist, the
alias will be created.
name
The local user/address to assign an alias to
target
The forwarding address
u nameu changesu resultu u commentu aliases.has_targetu Alias {0} already presentu testu# Alias {0} -> {1} is set to be addedu aliases.set_targetu aliasu Set email alias {0} -> {1}u Failed to set alias {0} -> {1}N( t Falset __salt__t Truet formatt __opts__t None( t namet targett ret( ( s5 /usr/lib/python2.7/site-packages/salt/states/alias.pyt present s*
c C@ s� i | d 6i d 6t d 6d d 6} t d | � sS t | d <d j | � | d <| St d r~ d | d <d j | � | d <| St d
| � r� i | d 6| d <t | d <d j | � | d <| St | d <d
j | � | d <| Sd S( uU
Ensure that the named alias is absent
name
The alias to remove
u nameu changesu resultu u commentu aliases.get_targetu Alias {0} already absentu testu Alias {0} is set to be removedu aliases.rm_aliasu aliasu Removed alias {0}u Failed to remove alias {0}N( R R R R R R ( R R ( ( s5 /usr/lib/python2.7/site-packages/salt/states/alias.pyt absentF s(
N( t __doc__t
__future__R R R R R
( ( ( s5 /usr/lib/python2.7/site-packages/salt/states/alias.pyt <module> s &