403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.11/site-packages/ansible/modules/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.11/site-packages/ansible/modules/__pycache__/dnf.cpython-311.opt-1.pyc
�

���c�����ddlmZmZmZeZdZdZddlZddl	Z	ddl
Z
ddlmZm
Z
ddlmZddlmZmZddlmZdd	lmZdd
lmZddlmZmZmZddlmZmZda Gd
�de��Z!d�Z"e#dkre"��dSdS)�)�absolute_import�division�print_functiona&
---
module: dnf
version_added: 1.9
short_description: Manages packages with the I(dnf) package manager
description:
     - Installs, upgrade, removes, and lists packages and groups with the I(dnf) package manager.
options:
  name:
    description:
      - "A package name or package specifier with version, like C(name-1.0).
        When using state=latest, this can be '*' which means run: dnf -y update.
        You can also pass a url or a local path to a rpm file.
        To operate on several packages this can accept a comma separated string of packages or a list of packages."
      - Comparison operators for package version are valid here C(>), C(<), C(>=), C(<=). Example - C(name >= 1.0).
        Spaces around the operator are required.
      - You can also pass an absolute path for a binary which is provided by the package to install.
        See examples for more information.
    required: true
    aliases:
        - pkg
    type: list
    elements: str

  list:
    description:
      - Various (non-idempotent) commands for usage with C(/usr/bin/ansible) and I(not) playbooks.
        Use M(ansible.builtin.package_facts) instead of the C(list) argument as a best practice.
    type: str

  state:
    description:
      - Whether to install (C(present), C(latest)), or remove (C(absent)) a package.
      - Default is C(None), however in effect the default action is C(present) unless the C(autoremove) option is
        enabled for this module, then C(absent) is inferred.
    choices: ['absent', 'present', 'installed', 'removed', 'latest']
    type: str

  enablerepo:
    description:
      - I(Repoid) of repositories to enable for the install/update operation.
        These repos will not persist beyond the transaction.
        When specifying multiple repos, separate them with a ",".
    type: list
    elements: str

  disablerepo:
    description:
      - I(Repoid) of repositories to disable for the install/update operation.
        These repos will not persist beyond the transaction.
        When specifying multiple repos, separate them with a ",".
    type: list
    elements: str

  conf_file:
    description:
      - The remote dnf configuration file to use for the transaction.
    type: str

  disable_gpg_check:
    description:
      - Whether to disable the GPG checking of signatures of packages being
        installed. Has an effect only if state is I(present) or I(latest).
      - This setting affects packages installed from a repository as well as
        "local" packages installed from the filesystem or a URL.
    type: bool
    default: 'no'

  installroot:
    description:
      - Specifies an alternative installroot, relative to which all packages
        will be installed.
    version_added: "2.3"
    default: "/"
    type: str

  releasever:
    description:
      - Specifies an alternative release from which all packages will be
        installed.
    version_added: "2.6"
    type: str

  autoremove:
    description:
      - If C(true), removes all "leaf" packages from the system that were originally
        installed as dependencies of user-installed packages but which are no longer
        required by any such package. Should be used alone or when state is I(absent)
    type: bool
    default: "no"
    version_added: "2.4"
  exclude:
    description:
      - Package name(s) to exclude when state=present, or latest. This can be a
        list or a comma separated string.
    version_added: "2.7"
    type: list
    elements: str
  skip_broken:
    description:
      - Skip all unavailable packages or packages with broken dependencies
        without raising an error. Equivalent to passing the --skip-broken option.
    type: bool
    default: "no"
    version_added: "2.7"
  update_cache:
    description:
      - Force dnf to check if cache is out of date and redownload if needed.
        Has an effect only if state is I(present) or I(latest).
    type: bool
    default: "no"
    aliases: [ expire-cache ]
    version_added: "2.7"
  update_only:
    description:
      - When using latest, only update installed packages. Do not install packages.
      - Has an effect only if state is I(latest)
    default: "no"
    type: bool
    version_added: "2.7"
  security:
    description:
      - If set to C(true), and C(state=latest) then only installs updates that have been marked security related.
      - Note that, similar to C(dnf upgrade-minimal), this filter applies to dependencies as well.
    type: bool
    default: "no"
    version_added: "2.7"
  bugfix:
    description:
      - If set to C(true), and C(state=latest) then only installs updates that have been marked bugfix related.
      - Note that, similar to C(dnf upgrade-minimal), this filter applies to dependencies as well.
    default: "no"
    type: bool
    version_added: "2.7"
  enable_plugin:
    description:
      - I(Plugin) name to enable for the install/update operation.
        The enabled plugin will not persist beyond the transaction.
    version_added: "2.7"
    type: list
    elements: str
  disable_plugin:
    description:
      - I(Plugin) name to disable for the install/update operation.
        The disabled plugins will not persist beyond the transaction.
    version_added: "2.7"
    type: list
    elements: str
  disable_excludes:
    description:
      - Disable the excludes defined in DNF config files.
      - If set to C(all), disables all excludes.
      - If set to C(main), disable excludes defined in [main] in dnf.conf.
      - If set to C(repoid), disable excludes defined for given repo id.
    version_added: "2.7"
    type: str
  validate_certs:
    description:
      - This only applies if using a https url as the source of the rpm. e.g. for localinstall. If set to C(false), the SSL certificates will not be validated.
      - This should only set to C(false) used on personally controlled sites using self-signed certificates as it avoids verifying the source site.
    type: bool
    default: "yes"
    version_added: "2.7"
  sslverify:
    description:
      - Disables SSL validation of the repository server for this transaction.
      - This should be set to C(false) if one of the configured repositories is using an untrusted or self-signed certificate.
    type: bool
    default: "yes"
    version_added: "2.13"
  allow_downgrade:
    description:
      - Specify if the named package and version is allowed to downgrade
        a maybe already installed higher version of that package.
        Note that setting allow_downgrade=True can make this module
        behave in a non-idempotent way. The task could end up with a set
        of packages that does not match the complete list of specified
        packages to install (because dependencies between the downgraded
        package and others can cause changes to the packages which were
        in the earlier transaction).
    type: bool
    default: "no"
    version_added: "2.7"
  install_repoquery:
    description:
      - This is effectively a no-op in DNF as it is not needed with DNF, but is an accepted parameter for feature
        parity/compatibility with the I(yum) module.
    type: bool
    default: "yes"
    version_added: "2.7"
  download_only:
    description:
      - Only download the packages, do not install them.
    default: "no"
    type: bool
    version_added: "2.7"
  lock_timeout:
    description:
      - Amount of time to wait for the dnf lockfile to be freed.
    required: false
    default: 30
    type: int
    version_added: "2.8"
  install_weak_deps:
    description:
      - Will also install all packages linked by a weak dependency relation.
    type: bool
    default: "yes"
    version_added: "2.8"
  download_dir:
    description:
      - Specifies an alternate directory to store packages.
      - Has an effect only if I(download_only) is specified.
    type: str
    version_added: "2.8"
  allowerasing:
    description:
      - If C(true) it allows  erasing  of  installed  packages to resolve dependencies.
    required: false
    type: bool
    default: "no"
    version_added: "2.10"
  nobest:
    description:
      - Set best option to False, so that transactions are not limited to best candidates only.
    required: false
    type: bool
    default: "no"
    version_added: "2.11"
  cacheonly:
    description:
      - Tells dnf to run entirely from system cache; does not download or update metadata.
    type: bool
    default: "no"
    version_added: "2.12"
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.flow
attributes:
    action:
        details: In the case of dnf, it has 2 action plugins that use it under the hood, M(ansible.builtin.yum) and M(ansible.builtin.package).
        support: partial
    async:
        support: none
    bypass_host_loop:
        support: none
    check_mode:
        support: full
    diff_mode:
        support: full
    platform:
        platforms: rhel
notes:
  - When used with a C(loop:) each package will be processed individually, it is much more efficient to pass the list directly to the I(name) option.
  - Group removal doesn't work if the group was installed with Ansible because
    upstream dnf's API doesn't properly mark groups as installed, therefore upon
    removal the module is unable to detect that the group is installed
    (https://bugzilla.redhat.com/show_bug.cgi?id=1620324)
requirements:
  - "python >= 2.6"
  - python-dnf
  - for the autoremove option you need dnf >= 2.0.1"
author:
  - Igor Gnatenko (@ignatenkobrain) <i.gnatenko.brain@gmail.com>
  - Cristian van Ee (@DJMuggs) <cristian at cvee.org>
  - Berend De Schouwer (@berenddeschouwer)
  - Adam Miller (@maxamillion) <admiller@redhat.com>
a�
- name: Install the latest version of Apache
  ansible.builtin.dnf:
    name: httpd
    state: latest

- name: Install Apache >= 2.4
  ansible.builtin.dnf:
    name: httpd >= 2.4
    state: present

- name: Install the latest version of Apache and MariaDB
  ansible.builtin.dnf:
    name:
      - httpd
      - mariadb-server
    state: latest

- name: Remove the Apache package
  ansible.builtin.dnf:
    name: httpd
    state: absent

- name: Install the latest version of Apache from the testing repo
  ansible.builtin.dnf:
    name: httpd
    enablerepo: testing
    state: present

- name: Upgrade all packages
  ansible.builtin.dnf:
    name: "*"
    state: latest

- name: Install the nginx rpm from a remote repo
  ansible.builtin.dnf:
    name: 'http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm'
    state: present

- name: Install nginx rpm from a local file
  ansible.builtin.dnf:
    name: /usr/local/src/nginx-release-centos-6-0.el6.ngx.noarch.rpm
    state: present

- name: Install Package based upon the file it provides
  ansible.builtin.dnf:
    name: /usr/bin/cowsay
    state: present

- name: Install the 'Development tools' package group
  ansible.builtin.dnf:
    name: '@Development tools'
    state: present

- name: Autoremove unneeded packages installed as dependencies
  ansible.builtin.dnf:
    autoremove: yes

- name: Uninstall httpd but keep its dependencies
  ansible.builtin.dnf:
    name: httpd
    state: absent
    autoremove: no

- name: Install a modularity appstream with defined stream and profile
  ansible.builtin.dnf:
    name: '@postgresql:9.6/client'
    state: present

- name: Install a modularity appstream with defined stream
  ansible.builtin.dnf:
    name: '@postgresql:9.6'
    state: present

- name: Install a modularity appstream with defined profile
  ansible.builtin.dnf:
    name: '@postgresql/client'
    state: present
N)�	to_native�to_text)�
fetch_file)�PY2�	text_type)�LooseVersion)�
AnsibleModule)�get_best_parsable_locale)�
has_respawned�probe_interpreters_for_module�respawn_module)�YumDnf�yumdnf_argument_specc���eZdZdZ�fd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zdd
�Z
d�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z�xZS)�	DnfModulez4
    DNF Ansible module back-end implementation
    c�V��tt|���|��|���d|_d|_	tjj|_	n#t$r
d|_	YnwxYw|jjd|_
|jjd|_dS)Nz/var/cache/dnf/*_lock.pid�dnfF�allowerasing�nobest)�superr�__init__�_ensure_dnf�lockfile�pkg_mgr_namer�base�WITH_MODULES�with_modules�AttributeError�module�paramsrr)�selfr"�	__class__s  ��8/usr/lib/python3.11/site-packages/ansible/modules/dnf.pyrzDnfModule.__init__�s����
�i����'�'��/�/�/�������3��
�!���	&� #�� 5�D�����	&�	&�	&� %�D����	&����!�K�.�~�>����k�(��2����s�
A$�$A8�7A8c��dS)NT��r$s r&�is_lockfile_pid_validzDnfModule.is_lockfile_pid_valid�s	���t�c��td��t|��vstd��t|��vrd�|��S|S)z�
        For unhandled dnf.exceptions.Error scenarios, there are certain error
        messages we want to filter in an install scenario. Do that here.
        �no package matched�No match for argument:�No package {0} available.)r�format�r$�spec�errors   r&�_sanitize_dnf_error_msg_installz)DnfModule._sanitize_dnf_error_msg_install�sQ��
�(�)�)�W�U�^�^�;�;��,�-�-�����?�?�.�5�5�d�;�;�;��r+c�|�dt|��vsdt|��vrdd�|��fSd|fS)z�
        For unhandled dnf.exceptions.Error scenarios, there are certain error
        messages we want to ignore in a removal scenario as known benign
        failures. Do that here.
        r-r.Fz{0} is not installedT)rr0r1s   r&�_sanitize_dnf_error_msg_removez(DnfModule._sanitize_dnf_error_msg_remove�sP��
!�I�e�$4�$4�4�4�$�	�%�(8�(8�8�8��1�8�8��>�>�?�?��e�}�r+c���|j|jt|j��|j|j|jd�}djd	i|��|d<|d|d<|jdkrd|d<nd|d<|S)
z3Return a dictionary of information for the package.)�name�arch�epoch�release�version�repoz){epoch}:{name}-{version}-{release}.{arch}�envra�nevrar�	available�yumstate�	installedr()	r8r9�strr:r;r<�repoidr0�installtime)r$�package�results   r&�
_package_dictzDnfModule._package_dict�s���
�L��L����'�'������N�
$�$��M�E�L�V�V�v�V�V��w��!��/��w����!�#�#�!,�F�:���!,�F�:���
r+c�\�gd�}|�d��\}}}|r
|r||vr||fS|dfS)N)@�aarch64�	alphaev56�alphaev5�	alphaev67�alphaev6�alpha�
alphapca56�amd64�armv3l�armv4b�armv4l�	armv5tejl�armv5tel�armv5tl�armv6hl�armv6l�armv7hl�armv7hnl�armv7l�athlon�geode�i386�i486�i586�i686�ia32e�ia64�m68k�mips64el�mips64�
mips64r6el�mips64r6�mipsel�mips�mipsr6el�mipsr6�noarch�pentium3�pentium4�ppc32dy4�ppc64iseries�ppc64le�ppc64�ppc64p7�ppc64pseries�ppc8260�ppc8560�
ppciseries�ppc�
ppcpseries�riscv64�s390�s390x�sh3�sh4a�sh4�sh�sparc64�sparc64v�sparc�sparcv8�sparcv9�sparcv9v�x86_64�.)�
rpartition)r$�packagename�redhat_rpm_archesr8�	delimiterr9s      r&�_split_package_archzDnfModule._split_package_arch�s_��

�

�

��!,� 6� 6�s� ;� ;���i���	�D�	�T�%6�6�6���:���D� � r+c	��|dd�dkr
|dd�}tjd��}	d}|�|��\}}|r|}|�|��}|r^|�|�����\}}}}	|r-|�d��d���sdSndSnG#t$r:}
|j�	d|�dt|
����d	g�
��Yd}
~
nd}
~
wwxYw|sd}d|vr:|�d��}|d}d
�|d	d���}|||	|d�}|S)z�
        Return a dictionary of information for a package name string or None
        if the package name doesn't contain at least all NVR elements
        ���N�.rpmz$(\S+)-(?:(\d*):)?(.*)-(~?\w+[\w.+]*)r�rz#Error attempting to parse package: z, �)�msg�rc�results�0�:�)r8r:r;r<)�re�compiler��match�groups�split�isdigitr!r"�	fail_jsonr�join)
r$r��rpm_nevr_rer9�nevr�rpm_nevr_matchr8r:r<r;�e�
epoch_namerGs
             r&�_packagename_dictzDnfModule._packagename_dict�s����r�s�s��v�%�%�%�c�r�c�*�K��j�!H�I�I��	��D��1�1�+�>�>�J�D�$��
#�"��(�.�.�{�;�;�N��
�0;�0A�0A�+�0N�0N�0U�0U�0W�0W�-��e�W�g�� �g�m�m�C�&8�&8��&;�&C�&C�&E�&E� ��4� ��t� ���	�	�	��K�!�!�!�CN�;�;�PY�Z[�P\�P\�P\�]���
"�
�
�
�
�
�
�
�
�����	�����	��E��$�;�;����C���J��q�M�E��7�7�:�a�b�b�>�*�*�D�����	
�
���
s�BC�C�
D�0D�Dc�$�|�d}nt|��}t|��}t|��}|�d}nt|��}t|��}t|��}tjj�|||f|||f��}|S)Nr�)rCr�rpm�labelCompare)r$�e1�v1�r1�e2�v2�r2r�s        r&�_compare_evrzDnfModule._compare_evrs����:��B�B��R���B�
��W�W��
��W�W��
�:��B�B��R���B�
��W�W��
��W�W��
�W�[�
%�
%�r�2�r�l�R��R�L�
A�
A���	r+c	�"�t|j��}|xtjd<tjd<|xtjd<tjd<	ddladdladdladdladdladdl	ad}n#t$rd}YnwxYw|rdSgd�}t��s!t|d	��}|rt|��|j�d
�t jt j�dd��|��g�
��dS)N�LC_ALL�LC_MESSAGES�LANGUAGE�LANGrTF)z/usr/libexec/platform-pythonz/usr/bin/python3z/usr/bin/python2z/usr/bin/pythonrz�Could not import the dnf python module using {0} ({1}). Please install `python3-dnf` or `python2-dnf` package or ensure you have specified the correct ansible_python_interpreter. (attempted {2})�
r��r�r�)r
r"�os�environr�dnf.cli�	dnf.const�dnf.exceptions�dnf.subject�dnf.util�ImportErrorrrrr�r0�sys�
executabler<�replace)r$�locale�HAS_DNF�system_interpreters�interpreters     r&rzDnfModule._ensure_dnf*sa��)�$�+�6�6��;A�A��
�8��r�z�-�8�6<�<��
�:����F�!3�		��J�J�J��N�N�N�����!�!�!�!������O�O�O��G�G���	�	�	��G�G�G�	�����	��F�2�2�2��
���	,�7�8K�U�S�S�K��
,��{�+�+�+�	
����F�������(;�(;�D�"�(E�(E�GZ�[�[��	�	
�	
�	
�	
�	
s�A-�-A<�;A<�/Tc���|j}|rDtj|tj��s|j�d|g���n||_|���d|_||_	||_
d|_||_||_
|j�|��|jr5t#|j��}|�|j��||_|jr>t#|j��}|j|vr!|�|j��||_|j�|j|jd<|j�d���$|j�d��d|jd<|jrd|_|jrd|_|jrd|_|jr|j|_|j rd|_ |j!|_"|j#|_#dS)	zConfigure the dnf Base object.zcannot read configuration file)r��	conf_filer�rTN�
releaseverzUUnable to detect release version (use "releasever" option to specify release version)r�)$�confr��access�R_OKr"r��config_file_path�read�
debuglevel�gpgcheck�localpkg_gpgcheck�	assumeyes�	sslverify�installroot�
substitutions�update_from_etc�exclude�list�extend�disable_excludes�appendr��get�warn�skip_broken�strictr�best�
download_only�downloadonly�download_dir�destdir�	cacheonly�
autoremove�clean_requirements_on_remove�install_weak_deps)	r$rr��disable_gpg_checkr�r�r��	_excludes�_disable_excludess	         r&�_configure_basezDnfModule._configure_baseUs"���y���	2��9�Y���0�0�
2���%�%�8�I��&�����
)2��%�	
�	�	�������.�-��
�%6�!6������#���'���	
��*�*�;�7�7�7��<�	%��T�\�*�*�I����T�\�*�*�*�$�D�L�� �	:� $�T�%:� ;� ;���$�,=�=�=�!�(�(��)>�?�?�?�(9��%��?�&�/3��D��|�,���!�!�,�/�/�7��K���g�
�
�
�
02�D��|�,���	��D�K��;�	��D�I���	1� $�D��� �
1�#�0����>�	"�!�D�N�-1�O��)�"&�!7����r+c��|���|j}|D]0}|r,|�|��D]}|�����1|D]0}|r,|�|��D]}|�����1dS)z?Enable and disable repositories matching the provided patterns.N)�read_all_repos�repos�get_matching�disable�enable)r$r�disablerepo�
enablerepor��repo_patternr=s       r&�_specify_repositorieszDnfModule._specify_repositories�s����������
��(�	#�	#�L��
#�!�.�.�|�<�<�#�#�D��L�L�N�N�N�N��'�	"�	"�L��
"�!�.�.�|�<�<�"�"�D��K�K�M�M�M�M��	"�	"r+c�R�t���}|�|||||��	|���n#t$rYnwxYw	|�t
|j��t
|j����|�	��n#t$rYnwxYw|�
|||��	|���n#t$rYnwxYw	|jrt	|���n^#tj
j$rG}|j�d�t%|����gd���Yd}~nd}~wwxYw|�d���n^#tj
j$rG}|j�d�t%|����gd���Yd}~nd}~wwxYwt)|dd��}	t+|	��rmi}
|jr)|
�dg���d	��|jr)|
�dg���d
��|
r|	d
i|
��n�g}
|jrMdd	i}|
�|j������jdi|����|jrMdd
i}|
�|j������jdi|����|
r|
|_|S)z*Return a fully configured dnf Base object.z{0}r��r�r�r�N�auto)�load_system_repo�add_security_filters�types�bugfix�security�eq�advisory_type__eq)rr()r�Baser��
setup_loggersr!�init_plugins�set�disable_plugin�
enable_plugin�pre_configure_pluginsr��configure_plugins�update_cache�
exceptions�	RepoErrorr"r�r0r�	fill_sack�getattr�callabler��
setdefaultr�r�sack�query�upgrades�filter�_update_security_filters)r$r�r�r�r�r�r�rr�r��filters�keys            r&�_basezDnfModule._base�s����x�x�z�z�����T�9�.?��i�X�X�X�	�
��� � � � ���	�	�	��D�	����	����c�$�"5�6�6��D�<N�8O�8O�P�P�P��&�&�(�(�(�(���	�	�	��D�	�����"�"�4��j�A�A�A�	��"�"�$�$�$�$���	�	�	��D�	����	�� �
���%�%�'�'�'�'���~�/�����K�)�)�!�L�L�����4�4� "��*�����������������
�N�N�F�N�3�3�3�3���~�'�	�	�	��K�!�!��L�L�����,�,���
"�
�
�
�
�
�
�
�
�����	���� '�t�-C�T�J�J���(�)�)�	8��G��{�
A��"�"�7�B�/�/�6�6�x�@�@�@��}�
C��"�"�7�B�/�/�6�6�z�B�B�B��
6�$�$�5�5�W�5�5�5���G��{�
K�*�H�5�����B�t�y���0�0�9�9�;�;�B�I�I�S�I�I�J�J�J��}�
K�*�J�7�����B�t�y���0�0�9�9�;�;�B�I�I�S�I�I�J�J�J��
8�07��-��sx�A	�	
A�A�AB)�)
B6�5B6�C&�&
C3�2C3�7F	�?D�F	�E/�(=E*�%F	�*E/�/F	�	G$�=G�G$c����|dkrd}|dvrA�fd�t�jj���|����D��}nw|dvr)d��jj���D��}nJtj�|���	�jj��}�fd�|D��}�j
�d|�	��d
S)z'List package info based on the command.�updatesr)rBrr@c�:��g|]}��|����Sr(�rH��.0rFr$s  �r&�
<listcomp>z(DnfModule.list_items.<locals>.<listcomp>s=���K�K�K���"�"�7�+�+�K�K�Kr+)r��repositoriesc�"�g|]}|jdd���
S)�enabled)rD�state)�id)rr=s  r&r z(DnfModule.list_items.<locals>.<listcomp>
s2��<�<�<�� �7�Y�7�7�<�<�<r+c�:��g|]}��|����Sr(rrs  �r&r z(DnfModule.list_items.<locals>.<listcomp>s'���K�K�K�w�t�)�)�'�2�2�K�K�Kr+r�r�N)rrrrr��iter_enabledr�subject�Subject�get_best_queryr"�	exit_json)r$�commandr��packagess`   r&�
list_itemszDnfModule.list_itemss����i��� �G��<�<�<�K�K�K�K�G�w�t�y�~�';�';�'=�'=�w�G�G�I�I�K�K�K�G�G��1�
1�
1�<�<� �I�O�8�8�:�:�<�<�<�G�G�
�{�*�*�7�3�3�B�B�4�9�>�R�R�H�K�K�K�K�(�K�K�K�G�����"�g��6�6�6�6�6r+c�l�|jj������}i}|�|��\}}|r||d<|�|��}|r.t
|d��|d<|�|��n||d<t|j	di|����S)Nr9r:r8r()
rrrrBr�r��int�update�boolr)r$�pkgrB�package_specr8r9�package_detailss       r&�
_is_installedzDnfModule._is_installeds����I�N�(�(�*�*�4�4�6�6�	����-�-�c�2�2�
��d��	(�#'�L�� ��0�0��5�5���	(�'*�?�7�+C�'D�'D�O�G�$�����0�0�0�0�#'�L�� ��$�I�$�4�4�|�4�4�5�5�5r+c	��|�|��}|sdS|jj������}|�|d������}|rI|d}|�|j|j	|j
|d|d|d��}|dkSdS)	NFr8)r8rr:r<r;r�)r�rrrrBr�runr�r:r<r;)r$�pkg_name�
candidate_pkgrB�
installed_pkg�evr_cmps      r&�_is_newer_version_installedz%DnfModule._is_newer_version_installed(s����.�.�x�8�8�
��	��5��I�N�(�(�*�*�4�4�6�6�	�!�(�(�m�F�.C�(�D�D�H�H�J�J�
��	�)�!�,�M��'�'��#�]�%:�M�<Q��g�&�
�i�(@�-�PY�BZ���G�
�a�<���5r+Fc	�p�|�|��}|�|��}	|r|jrw|rI|r|j�|��n�|j�||jjj���nx|j�||jjj���nLnK|r|r|j�|��n,n+|j�||jjj���ddddd�S#tj	j
$rG}dd�|��d�|t|��f��d	gd
�cYd}~Sd}~wtj	j$rG}dd�|��d�|t|��f��d	gd
�cYd}~Sd}~wtj	j$rp}t!d
��t!|��vrdddd�cYd}~Sdd�|��d�|t|��f��d	gd
�cYd}~Sd}~wwxYw)zMark the package for install.�r�Fr�r)�failedr��failurer�Tr/� r�)r@r�rAr�r�Nz(Depsolve Error occurred for package {0}.�already installed)r@r�rAz'Unknown Error occurred for package {0}.)r=r6�allow_downgrader�upgrade�installr�r�rr�MarkingErrorr0r�r�
DepsolveError�Errorr)r$�pkg_specrE�is_newer_version_installed�is_installedr�s      r&�_mark_package_installzDnfModule._mark_package_install>s���%)�%E�%E�h�%O�%O�"��)�)�(�3�3��@	�)�
J��'��
�R�'�
V�!�I�-�-�h�7�7�7�7� �I�-�-�h�t�y�~�?T�-�U�U�U�U��	�)�)�(�4�9�>�;P�)�Q�Q�Q�Q���
J����I�%�%�h�/�/�/�/���	�!�!�(�4�9�>�3H�!�I�I�I�#�B�2�Q�G�G�G���~�*�	�	�	��2�9�9�(�C�C��8�8�X�y��|�|�$<�=�=�����
�
�
�
�
�
������~�+�	�	�	��A�H�H��R�R��8�8�X�y��|�|�$<�=�=�����
�
�
�
�
�
������~�#�
	�
	�
	��*�+�+�w�q�z�z�9�9�"'��r�B�B�B�B�B�B�B�B�#�D�K�K�H�U�U�"�x�x��9�Q�<�<�(@�A�A��!�������������	
	���sN�CC?�?H5�<E�H5�H5�,<F.�(H5�.H5�#H0�(H5�.<H0�*H5�0H5c�X�|j���|jj������}|�|���}|�|�|��������}|r
|djSdS)N)�file)�providesr)	rr�rrr@r�unionr8r8)r$�filepathr@�files_filterrJs     r&�
_whatprovideszDnfModule._whatprovides�s����	� � �"�"�"��I�N�(�(�*�*�4�4�6�6�	� �'�'�X�'�6�6���%�%�i�&6�&6��&6�&I�&I�J�J�N�N�P�P���	$��A�;�#�#�	$�	$r+c�$�ggggf\}}}}d}|jD�]u}d|vr+t|j|��}|�|���2|�d��r|�|���]|�d��r.|�|��}|r|�|������|�d��sd|vr�|s|j���d}|dd��	��}|j
rP|j�|��}	|	dr|�|����2|�|����I|�|����`|�|����w||||fS)	NFz://r�r��@Tr�r)
�namesrr"r��endswith�
startswithrTr�
read_comps�stripr �module_base�_get_modules)
r$�	pkg_specs�	grp_specs�module_specs�	filenames�already_loaded_compsr8rJ�grp_env_mdl_candidate�mdls
          r&�_parse_spec_group_filez DnfModule._parse_spec_group_file�s���8:�B��B��5�	�9�l�I�$���J�	'�	'�D���}�}�!�$�+�t�4�4��� � ��&�&�&�&����v�&�&�
'�� � ��&�&�&�&�����%�%�
'��-�-�d�3�3�����$�$�X�.�.�.�������%�%�
'�#��+�+�+�0��I�(�(�*�*�*�+/�(�(,�Q�R�R����(8�(8�%��$�<��*�7�7�8M�N�N�C��1�v�@�$�+�+�,A�B�B�B�B�!�(�(�)>�?�?�?�?��$�$�%:�;�;�;�;�� � ��&�&�&�&��)�\�9�<�<r+c	���g}|D]�}|�|��r�	tt|��t��r|j�|��n|j�|���p#t$rG}|j�	d�
t|����gd���Yd}~��d}~wwxYw|�|����|S)Nz4Error occurred attempting update_only operation: {0}r�r�)
r6�
isinstancerr
rrE�package_upgrade�	Exceptionr"r�r0rr�)r$�pkgs�
not_installedr3r�s     r&�_update_onlyzDnfModule._update_only�s���
��	*�	*�C��!�!�#�&�&�

*�
�!�'�#�,�,�	�:�:�7��	�)�)�#�.�.�.�.��	�1�1�#�6�6�6��� �����K�)�)�R�Y�Y�Zc�de�Zf�Zf�g�g� "��*������������������$�$�S�)�)�)�)��s�AA5�5
C�?=C�Cc	�T�ttj�d��d��dkrDt	t|j�t	|����d�����}n�g}	|D]/}|�|j�	|�����0ns#t$rf}td��t|��vr>|j�
d�|t|����gd�	��Yd}~nd}~wwxYw|jr|�|��dS|D]�}	|�|�|��d
��r3|jr+|j�||jjj���n+|j�||jjj�����#t0$rG}|j�
d�t|����gd�	��Yd}~��d}~wwxYwdS)
Nr�r�T)�reversezCan not load RPM filezAError occurred attempting remote rpm install of package: {0}. {1}r�r�r?r?z3Error occurred attempting remote rpm operation: {0})r0r�__version__r�r��sortedr�add_remote_rpmsr��add_remote_rpm�IOErrorrr"r�r0r�update_onlyrlr=rHrD�package_installr�r�ri)r$rarj�filenamer�r3s      r&�_install_remote_rpmszDnfModule._install_remote_rpms�s^���s��$�$�S�)�)�!�,�-�-��2�2���t�y�8�8��i���I�I�SW�X�X�X�Y�Y�D�D��D�	
� )�D�D�H��K�K��	� 8� 8�� B� B�C�C�C�C�D���
�
�
��2�3�3�w�q�z�z�A�A��K�)�)�_�f�f�go�qz�{|�q}�q}�~�~� "��*�������������
������	����d�#�#�#�#�#��
�
����7�7��8J�8J�3�8O�8O�PW�8X�Y�Y�U��/�Y� �I�5�5�c�$�)�.�BW�5�X�X�X���	�1�1�#�d�i�n�>S�1�T�T�T��� �����K�)�)�Q�X�X�Yb�cd�Ye�Ye�f�f� "��*�����������������
�
s2�>2B1�1
D!�;AD�D!�BG�
H%�=H � H%c���|jrm|���}|j�|��\}}|jj�|j��}|r|jr
|j|vrdSdSdSdS)NTF)	r r[r\r]r�_moduleContainer�getEnabledStreamr8�stream)r$�module_spec�module_list�nsv�enabled_streamss     r&�_is_module_installedzDnfModule._is_module_installed�s�����	 �%�+�+�-�-�K�#�/�<�<�[�I�I��K��"�i�8�I�I�#�(�S�S�O��
 ��:� ��z�_�4�4�#�t�$�u��4��ur+c
��$�ddgdd�}dggdd�}|js|jrg|_d|_|jdgkr`|jd	krU	|j����
nD#t
jj$r"}d
|d<|jj	d5i|��Yd}~�
nd}~wwxYw|�
��\}}}}d�|D��}d
�|D��}g}g}	d�|D��D]�}
|jj�|
��}|r|�
|j���>|jj�|
��}|r|	�
|j���z|j�	d�|
��g�����|jdv�r[|�|��|D]0}
|d�
d�|
�����1|r�|jr�|D]�}	|�|��s.|d�
d�|����|j�|g��|j�|g���}#t
jj$rG}|d�
d�|t3|��f����Yd}~��d}~wwxYw|D�]5}	|j�|t
jj��}|dkr/|d�
d�|����n.|d�
d�|������#t
jj$r4}d�|��|d<|jj	d5i|��Yd}~��d}~wt
jj$rH}|d�
d�|t3|��f����Yd}~��/d}~wwxYw|	D]�}	|j�|t
jj���.#t
jj$r4}d�|��|d<|jj	d5i|��Yd}~�qd}~wt
jj$rG}|d�
d�|t3|��f����Yd}~��d}~wwxYw|r<|js5|j�	d�|d��g���|jr:|� |��}|D] }|d�
d|z���!�n\|D]�}|�!|��}|drT|dr|dxx|dz
cc<|d�
|�"||d�����s|dr!|d�
|d�����n�|jd	k�rd|�|��|D]0}
|d�
d�|
�����1|r�|jr�|D]�}	|�|��r.|d�
d�|����|j�#|g���b#t
jj$rG}|d�
d�|t3|��f����Yd}~��d}~wwxYw|D�]Z}		|j�$|��|d�
d�|����n�#t
jj%$r�|js�|j�|t
jj��}|dkr/|d�
d�|����n.|d�
d�|����YnwxYw��#t
jj$rH}|d�
d�|t3|��f����Yd}~��Td}~wwxYw|	D]�}		|j�&|��nD#t
jj%$r-|j�|t
jj��YnwxYw�d#t
jj$r"}d�|��|d<Yd}~��d}~wt
jj$rG}|d�
d�|t3|��f����Yd}~��d}~wwxYw|jr:|� |��}|D] }|d�
d|z���!�n|D]�}|j'|jj(_)|�!|d �!��}|drT|dr|dxx|dz
cc<|d�
|�"||d������|dr!|d�
|d�����nK|r|j�	d"g���|r�|jr�|D]�}	|�|��r.|d�
d#�|����|j�*|g��|j�+|g��|j�,|g����#t
jj$rG}|d�
d�|t3|��f����Yd}~��d}~wwxYw|D]B}	|j�-|���#t
jj%$rY�4t\$rY�?wxYw|	D]7}	|j�/|���#t
jj%$rY�4wxYw|jj0�1���2��}|D�]R}d|vr�	|j�*|��n�#t
jj3$r�}|�4|t3|����\}}|r=|d�
d$�|t3|������n|d�
|��Yd}~nd}~wwxYw��t
j5�6|���7|jj0�%���2���8��}|D])}|j�*ts|�����*��Td |_:|jr|j���	|j�;|j:�&��s8|drd'|d<|jj	d5i|��d(|d<|jj<d5i|��dSd |d)<|j=rd*}nd+}|jj>j?D]1}|d�
d,�||�����2|jj>j@D]0}|d�
d-�|�����1|drd'|d<|jj	d5i|��|jjArd.|d<|jj<d5i|��	|j=rx|jBrq|jj(jCr`t
jD�E|jj(jC��|jj(jC|jjF�G��_H|j�I|jj>j?��n]#t
jjJ$rF}|j�	d/�t�|����g���Yd}~nd}~wwxYw|jLs�|jj>j?D]�}d}|j�M|��\}}|dkr�(|dkr?	|j�N|��n%#t
jj$r}d }Yd}~n
d}~wwxYwd }|r0d0�||��}|j�	|����|j=r|jj<d5i|��nu|j�O��}|�Z|jjP�Q|g��d} | jRr-|d�
| �S����|drd'|d<|jj	d5i|��|jj<d5i|��dS#t
jj$rB}d1�t3|����|d<|jj	d5i|��Yd}~dSd}~wt
jj$r�}t�d2��t�|��vrSd|d)<|d�
d3�t3|������|jj<d5i|��n=d4�t3|����|d<|jj	d5i|��Yd}~dSYd}~dSd}~wwxYw)6Nr�Fr�r��changedr�r�r�)r��failuresr�r��absent�*�latestz:Depsolve Error occurred attempting to upgrade all packagesr�c�6�g|]}|�����Sr(�r[)r�ps  r&r z$DnfModule.ensure.<locals>.<listcomp>� ��6�6�6�q������6�6�6r+c�6�g|]}|�����Sr(r�)r�fs  r&r z$DnfModule.ensure.<locals>.<listcomp>r�r+c3�>K�|]}|���V��dS)Nr�)r�gs  r&�	<genexpr>z#DnfModule.ensure.<locals>.<genexpr>s*����>�>�Q�q�w�w�y�y�>�>�>�>�>�>r+zNo group {0} available.r�)rB�presentr�z
Installed {0}zModule {0} installed.r�rBzGroup {0} already installed.zGroup {0} installed.z8Depsolve Error occurred attempting to install group: {0}z>Depsolve Error occurred attempting to install environment: {0}z@Packages providing %s not installed due to update_only specifiedr@rAzModule {0} upgraded.zGroup {0} upgraded.T)rEz3Cannot remove paths -- please specify package name.zModule {0} removed.z	{0} - {1})r)�
allow_erasingz0Failed to install some of the specified packagesz
Nothing to dor��
Downloaded�	Installedz{0}: {1}zRemoved: {0}z@Check mode: No changes made, but would have if not in check modez Failed to download packages: {0}z-Failed to validate GPG signature for {0}: {1}zDepsolve Error occurred: {0}rCzPackage already installed: {0}zUnknown Error occurred: {0}r()TrWr�r$r�upgrade_allrrrHr"r�re�comps�group_by_patternr�r%�environment_by_patternr0rxr r�r\rFr��
MarkingErrorsr�r�
group_install�const�GROUP_PACKAGE_TYPESrI�environment_installrurlrMr4rE�
group_upgrade�
CompsError�environment_upgraderr�r��remover��reset�group_remover!�environment_removerrrBrGr6r(r)r*r8rCr�resolver+r��transaction�install_set�
remove_set�
check_moder�r��util�
ensure_dirr��all�pkgdir�download_packages�
DownloadErrorrr��_sig_check_pkg�_get_key_for_package�do_transaction�history�old�return_code�output)!r$�response�failure_responser�r^�group_specsr`rar��environments�
group_spec�group�environmentrwr"�group_pkg_count_installedrkr2rJ�install_resultrB�
is_failure�handled_remove_errorr;r3�install_actionrF�fail�gpgres�gpgerrr��tidr�s!                                 r&�ensurezDnfModule.ensure�s[������	
�
������	
�
���z�	"�d�o�	"��D�J�!�D�J��:�#����4�:��#9�#9�
:��	�%�%�'�'�'�'���>�/�
:�
:�
:�*f� ��'�%���%�9�9�(8�9�9�9�9�9�9�9�9�����
:����?C�>Y�>Y�>[�>[�;�I�{�L�)�6�6�I�6�6�6�I�6�6�I�6�6�6�I��F��L�>�>�+�>�>�>�
�
�
��	��8�8��D�D���
��M�M�%�(�+�+�+�+�"&�)�/�"H�"H��"T�"T�K�"��$�+�+�K�N�;�;�;�;���-�-� 9� @� @�� L� L�$&�.�����
�z�5�5�5��)�)�)�4�4�4� )�Q�Q�H��Y�'�.�.��/E�/E�h�/O�/O�P�P�P�P� �b�D�$5�b�".�b�b��b�#'�#<�#<�V�#D�#D�c� (�� 3� :� :�;R�;Y�;Y�Z`�;a�;a� b� b� b� �,�4�4�f�X�>�>�>� �,�3�3�V�H�=�=�=�=��"�~�;�b�b�b�,�Z�8�?�?����&�R[�\]�R^�R^�I_�@`�@`�a�a�a�a�a�a�a�a�����b����$�]�]�E�
]�48�I�4K�4K�E�SV�S\�Sp�4q�4q�1�4��9�9�$�Y�/�6�6�7U�7\�7\�]b�7c�7c�d�d�d�d�$�Y�/�6�6�7M�7T�7T�UZ�7[�7[�\�\�\����>�7�B�B�B�2l�2s�2s�ty�2z�2z�(��/�-���-�A�A�0@�A�A�A�A�A�A�A�A������>�/�]�]�]�)��4�;�;�C�H�H�e�Y�WX�\�\�EZ�<[�<[�\�\�\�\�\�\�\�\�����	]����$0�c�c�K�c��	�5�5�k�3�9�C`�a�a�a�a���>�7�B�B�B�2r�2y�2y�{F�3G�3G�(��/�-���-�A�A�0@�A�A�A�A�A�A�A�A������>�/�c�c�c�(��4�;�;�C�H�H�k�S\�]^�S_�S_�E`�<a�<a�b�b�b�b�b�b�b�b�����c���� ���(9���K�)�)�5�<�<�\�!�_�M�M� "�*�����#�
R�$(�$5�$5�i�$@�$@�M� -�~�~�� ��+�2�2�3u�x|�3|�}�}�}�}�~�%.�R�R��)-�)C�)C�H�)M�)M��)�(�3�R�-�e�4�Q� 0�� 7� 7� 7�>�%�;P� P� 7� 7� 7�,�Z�8�?�?��@d�@d�em�o}�H�pI�AJ�AJ�K�K�K�K�-�e�4�R� (�� 3� :� :�>�%�;P� Q� Q� Q��R���x�'�'��)�)�)�4�4�4� )�Q�Q�H��Y�'�.�.��/E�/E�h�/O�/O�P�P�P�P� �b�D�$5�b�".�b�b��b�#�8�8��@�@�b� (�� 3� :� :�;Q�;X�;X�Y_�;`�;`� a� a� a� �,�4�4�f�X�>�>�>�>��"�~�;�b�b�b�,�Z�8�?�?����&�R[�\]�R^�R^�I_�@`�@`�a�a�a�a�a�a�a�a�����b����$�]�]�E�
]�
e� �I�3�3�E�:�:�:�$�Y�/�6�6�7L�7S�7S�TY�7Z�7Z�[�[�[�[��"�~�8�e�e�e�#'�#3�e�<@�I�<S�<S�TY�[^�[d�[x�<y�<y� 9�#<��#A�#A�$,�Y�$7�$>�$>�?]�?d�?d�ej�?k�?k�$l�$l�$l�$l�$,�Y�$7�$>�$>�?U�?\�?\�]b�?c�?c�$d�$d�$d���e�������>�/�]�]�]�(��4�;�;�C�H�H�e�Y�WX�\�\�EZ�<[�<[�\�\�\�\�\�\�\�\�����]����$0�
c�
c�K�	c�f� �I�9�9�+�F�F�F�F��"�~�8�f�f�f� �I�9�9�+�s�y�Gd�e�e�e�e�e�f�������>�7�G�G�G�2r�2y�2y�{F�3G�3G�(��/�/�/�/�/�/������>�/�c�c�c�(��4�;�;�C�H�H�k�S\�]^�S_�S_�E`�<a�<a�b�b�b�b�b�b�b�b�����c�����#�R�$(�$5�$5�i�$@�$@�M� -�~�~�� ��+�2�2�3u�x|�3|�}�}�}�}�~�%.�R�R��37�+�o��	��+�)-�)C�)C�H�VZ�)C�)[�)[��)�(�3�R�-�e�4�Q� 0�� 7� 7� 7�>�%�;P� P� 7� 7� 7�,�Z�8�?�?��@d�@d�em�o}�H�pI�AJ�AJ�K�K�K�K�-�e�4�R� (�� 3� :� :�>�%�;P� Q� Q� Q��R�&���K�)�)�Q� "�*���� �	b�D�$5�	b�".�b�b��b�#�8�8��@�@�a� (�� 3� :� :�;P�;W�;W�X^�;_�;_� `� `� `� �,�3�3�V�H�=�=�=� �,�4�4�f�X�>�>�>� �,�2�2�F�8�<�<�<�<��"�~�;�b�b�b�,�Z�8�?�?����&�R[�\]�R^�R^�I_�@`�@`�a�a�a�a�a�a�a�a�����b����$�
�
�E���	�.�.�u�5�5�5�5���>�4������)����������$0���K���	�4�4�[�A�A�A�A���>�4����������!�I�N�0�0�2�2�<�<�>�>�	� )�3�3�H��h���Q� �I�,�,�X�6�6�6�6��"�~�:�Q�Q�Q�?C�?b�?b�ck�mv�wx�my�my�?z�?z�<�J�(<�)�Q� 0�� <� C� C�K�DV�DV�W_�aj�kl�am�am�Dn�Dn� o� o� o� o� (�� 3� :� :�;O� P� P� P����������Q����!�$'�K�$7�$7��$A�$A�$P�$P�!�Y�^�%Q�%-�%-�-6�Y�[�[�����"� -�3�3���	�(�(��S���2�2�2�2�3�
%)��!��?�+��I�(�(�*�*�*�_	:��9�$�$�4�3D�$�E�E�J
2�#�J�/�>�.`�$�U�+�)�D�K�)�=�=�,<�=�=�=�"1����%���%�1�1��1�1�1�1�1�&*���#��%�1�%1�N�N�%0�N�#�y�4�@�[�[�G��Y�'�.�.�z�/@�/@��QX�/Y�/Y�Z�Z�Z�Z�#�y�4�?�O�O�G��Y�'�.�.�~�/D�/D�W�/M�/M�N�N�N�N�#�J�/�>�.`�$�U�+�)�D�K�)�=�=�,<�=�=�=��;�)�6�&h�H�U�O�)�D�K�)�5�5�H�5�5�5�
��)�N�d�.?�N�D�I�N�DZ�N���+�+�D�I�N�,B�C�C�C�7;�y�~�7M��	��+�+�-�-�4��I�/�/��	�0E�0Q�R�R�R�R���~�3�����K�)�)�>�E�E�g�a�j�j�Q�Q� "�*������������������-�7�#'�9�#8�#D�7�7��$��)-��)A�)A�'�)J�)J����!�Q�;�;�$�#�q�[�[�,� $�	� >� >�w� G� G� G� G��#&�>�#7�,�,�,�'+�����������,����$(�D��7�"Q�"X�"X�Y`�bh�"i�"i�C� �K�1�1�#�6�6�6���%�	V�*�D�K�)�5�5�H�5�5�5�5��)�2�2�4�4�C���&*�i�&7�&;�&;�S�E�&B�&B�1�&E��&�2�V�,�Z�8�?�?��@R�@R�@T�@T�U�U�U�#�J�/�>�.`�$�U�+�)�D�K�)�=�=�,<�=�=�=�%���%�1�1��1�1�1�1�1���~�+�	6�	6�	6�&D�&K�&K�I�VW�L�L�&Y�&Y��U�#�!�D�K�!�5�5�$4�5�5�5�5�5�5�5�5�5������~�#�	:�	:�	:��*�+�+�w�q�z�z�9�9�&+���#���#�*�*�+K�+R�+R�S\�]^�S_�S_�+`�+`�a�a�a�%���%�1�1��1�1�1�1�*G�*N�*N�y�YZ�|�|�*\�*\� ��'�%���%�9�9�(8�9�9�9�9�9�9�9�9�9�2�1�1�1�1�1�����		:���s
�A�B�2B�B�"A9I�J7�0=J2�2J7�B
M�O0�"*N�O0�(=O+�+O0�8*P#�#S�7*Q&�&S�==R?�?S�	AZ(�(\�<=[>�>\�
A]�`�B(`�>`�`�`�a!�=a�a!�*b�c
�>c�c
�c�c
�
e�c;�;e�=e�e�Bl�m3�,=m.�.m3�;n�n8�,	n8�7n8�o�o2�1o2�/q
�
s(�Bs#�#s(�#AAE�;CAE�B(}=�<AE�=�<�
AE��A	AE�@!A@<�@;AE�@<AA�AAA�AAE�AAA�AC8AE�EAI7�E*7AF'�F'AI7�F>B(AI2�I2AI7c��|jrSttj��td��kr)|j�dtjzg���|jrSttj��td��kr)|j�dtjzg���|jri|jsb|j	s[|�
|j|j|j
|j|j|j��|_|j�ddgd�	��|j�d|_|j	rY|�
|j|j|j
|j|j|j��|_|�|j	��d
S|js:tj���s|j�dg���|�
|j|j|j
|j|j|j��|_|jr.tjj�|j��|_|���d
S)
zThe main function.z2.0.1z9Autoremove requires dnf>=2.0.1. Current dnf version is %sr�z2.6.2z;download_dir requires dnf>=2.6.2. Current dnf version is %sz
Cache updatedFrr�NrBz/This command has to be run under the root user.)r�rrrpr"r�r�rrWr�rr�r�r�r�r�r�rr+r$r.r�r��	am_i_rootr r\�
ModuleBaser�r)s r&r8z
DnfModule.runTsO���?�	��C�O�,�,�|�G�/D�/D�D�D���%�%�S�VY�Ve�e��&������	��C�O�,�,�|�G�/D�/D�D�D���%�%�U�X[�Xg�g��&����
��
	�T�Z�
	��	�
	��
�
���� 6��8H����!1�4�>���D�I�
�K�!�!�#����	
"�
�
�
��:��$�D�J��9�	��
�
���� 6��8H����!1�4�>���D�I�
�O�O�D�I�&�&�&�&�&��%�
�c�h�.@�.@�.B�.B�
���%�%�I��&�����
�
���� 6��8H����!1�4�>���D�I�
� �
P�#&�:�#9�#D�#D�T�Y�#O�#O�� ��K�K�M�M�M�M�Mr+)r�T)F)�__name__�
__module__�__qualname__�__doc__rr*r4r6rHr�r�r�rr�r�rr.r6r=rMrTrerlrxr�r�r8�
__classcell__)r%s@r&rr�s����������3�3�3�3�3�"���
������ ���4!�!�!�(-�-�-�b���&)
�)
�)
�V[8�[8�[8�[8�z"�"�"�";�;�;�z7�7�7�.6�6�6�"���,D�D�D�D�L	$�	$�	$�!=�!=�!=�F���(���@���"[:�[:�[:�z
;�;�;�;�;�;�;r+rc��tdd���tdd<tdd���tdd<td
it��}t|��}	|���dS#t
jj$rD}|�d�	t|����dgd�	��Yd}~dSd}~wwxYw)NFr2)�default�type�
argument_specrrz#Failed to synchronize repodata: {0}r�)r�r�r�r�r()�dictrrrr8rrr
r�r0r)r"�module_implementation�des   r&�mainr��s��=A��U[�<\�<\�<\���)�.�9�6:�5�v�6V�6V�6V���)�(�3�
���
���F�&�f�-�-��
��!�!�#�#�#�#�#���>�#�
�
�
����5�<�<�Y�r�]�]�K�K����		�	
�	
�	
�	
�	
�	
�	
�	
�	
�����
���s� A6�6C�
9C	�	C�__main__)$�
__future__rrrr��
__metaclass__�
DOCUMENTATION�EXAMPLESr�r�r��ansible.module_utils._textrr�ansible.module_utils.urlsr�ansible.module_utils.sixr	r
�#ansible.module_utils.compat.versionr�ansible.module_utils.basicr�"ansible.module_utils.common.localer
�#ansible.module_utils.common.respawnrrr�ansible.module_utils.yumdnfrrrrr�r�r(r+r&�<module>r�sv��A�@�@�@�@�@�@�@�@�@��
�K�
�ZN��`
�	�	�	�	�	�	�	�
�
�
�
�9�9�9�9�9�9�9�9�0�0�0�0�0�0�3�3�3�3�3�3�3�3�<�<�<�<�<�<�4�4�4�4�4�4�G�G�G�G�G�G�l�l�l�l�l�l�l�l�l�l�D�D�D�D�D�D�D�D���O�O�O�O�O��O�O�O�d 
�
�
�B�z����D�F�F�F�F�F��r+

Youez - 2016 - github.com/yon3zu
LinuXploit