HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/alias.cpython-310.pyc
o

�N�g�	�@sdZdd�Zdd�ZdS)aH
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

cCs�|iddd�}td||�rd|d<d|�d�|d	<|Std
r1d|d<d|�d|�d
�|d	<|Std||�rNd|i|d<d|d<d|�d|��|d	<|Sd|d<d|�d|��|d	<|S)ap
    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
    F���name�changes�result�commentzaliases.has_targetTr�Alias z already presentr�testNz -> z is set to be addedzaliases.set_target�aliasrzSet email alias zFailed to set alias �Z__salt__Z__opts__)r�target�ret�r
�E/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/alias.py�presents"
rcCs�|iddd�}td|�sd|d<d|�d�|d	<|Std
r-d|d<d|�d�|d	<|Std
|�rFd|i|d<d|d<d|��|d	<|Sd|d<d|��|d	<|S)zU
    Ensure that the named alias is absent

    name
        The alias to remove
    Frrzaliases.get_targetTrrz already absentrrNz is set to be removedzaliases.rm_aliasr	rzRemoved alias zFailed to remove alias r
)rrr
r
r�absent?s"rN)�__doc__rrr
r
r
r�<module>s!