%PDF- %PDF-
| Direktori : /lib/python3.9/site-packages/ansible/modules/__pycache__/ |
| Current File : //lib/python3.9/site-packages/ansible/modules/__pycache__/dpkg_selections.cpython-39.pyc |
a
�)gh � @ sF d dl mZmZmZ eZdZdZd dlm 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 C s� t ttdd�tg d�dd�d�dd�} | �dd�}| jd }| jd }| j|d
|gdd�\}}}|sjd}n|�� d
}||k}| js�|s�| j|||d� | j|dgd||f dd� | j|||d� d S )NT)�required)�installZholdZ deinstall�purge)�choicesr )�name� selection)Z
argument_specZsupports_check_mode�dpkgr
r z--get-selections)�check_rcznot present� )�changed�beforeZafterz--set-selectionsz%s %s)�datar
)r �dictZget_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&