%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.9/site-packages/ansible/modules/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.9/site-packages/ansible/modules/__pycache__/dpkg_selections.cpython-39.pyc

a

�)gh	�@sFddlmZmZmZeZdZdZddlm	Z	dd�Z
edkrBe
�dS)	�)�absolute_import�division�print_functiona�
---
module: dpkg_selections
short_description: Dpkg package selection selections
description:
    - Change dpkg package selection state via --get-selections and --set-selections.
version_added: "2.0"
author:
- Brian Brazil (@brian-brazil)  <brian.brazil@boxever.com>
options:
    name:
        description:
            - Name of the package.
        required: true
        type: str
    selection:
        description:
            - The selection state to set the package to.
        choices: [ 'install', 'hold', 'deinstall', 'purge' ]
        required: true
        type: str
extends_documentation_fragment:
- action_common_attributes
attributes:
    check_mode:
        support: full
    diff_mode:
        support: full
    platform:
        support: full
        platforms: debian
notes:
    - This module won't cause any packages to be installed/removed/purged, use the C(apt) module for that.
z�
- name: Prevent python from being upgraded
  ansible.builtin.dpkg_selections:
    name: python
    selection: hold

- name: Allow python to be upgraded
  ansible.builtin.dpkg_selections:
    name: python
    selection: install
)�
AnsibleModulec	Cs�tttdd�tgd�dd�d�dd�}|�dd�}|jd}|jd	}|j|d
|gdd�\}}}|sjd}n|��d
}||k}|js�|s�|j|||d�|j|dgd||fdd�|j|||d�dS)NT)�required)�installZholdZ	deinstall�purge)�choicesr)�name�	selection)Z
argument_specZsupports_check_mode�dpkgr
rz--get-selections)�check_rcznot present�)�changed�beforeZafterz--set-selectionsz%s %s)�datar
)r�dictZget_bin_path�paramsZrun_command�splitZ
check_modeZ	exit_json)	�modulerr
r�rc�out�err�currentr�r�C/usr/lib/python3.9/site-packages/ansible/modules/dpkg_selections.py�main;s&��


r�__main__N)Z
__future__rrr�typeZ
__metaclass__Z
DOCUMENTATIONZEXAMPLESZansible.module_utils.basicrr�__name__rrrr�<module>s"

Zerion Mini Shell 1.0