a ì)gh ã@sFddlmZmZmZeZdZdZddlm Z dd„Z e dkrBe ƒ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) 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 r z--get-selections)Úcheck_rcz not presenté)ÚchangedÚbeforeZafterz--set-selectionsz%s %s)Údatar )rÚdictZ get_bin_pathÚparamsZ run_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Ús"