403Webshell
Server IP : 157.22.201.140  /  Your IP : 216.73.216.74
Web Server : nginx/1.30.1
System : Linux mit.vincode.fvds.ru 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/ansible/modules/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/ansible/modules/__pycache__/debconf.cpython-312.pyc
�

1<�e!��r�ddlmZmZmZeZdZdZdZddl	m
Z
ddlmZd�Z
d�Zd	�Zd
�Zedk(re�yy)
�)�absolute_import�division�print_functiona�
---
module: debconf
short_description: Configure a .deb package
description:
     - Configure a .deb package using debconf-set-selections.
     - Or just query existing selections.
version_added: "1.6"
extends_documentation_fragment:
- action_common_attributes
attributes:
    check_mode:
        support: full
    diff_mode:
        support: full
    platform:
        support: full
        platforms: debian
notes:
    - This module requires the command line debconf tools.
    - Several questions have to be answered (depending on the package).
      Use 'debconf-show <package>' on any Debian or derivative with the package
      installed to see questions/settings available.
    - Some distros will always record tasks involving the setting of passwords as changed. This is due to debconf-get-selections masking passwords.
    - It is highly recommended to add C(no_log=True) to the task while handling sensitive information using this module.
    - The debconf module does not reconfigure packages, it just updates the debconf database.
      An additional step is needed (typically with C(notify) if debconf makes a change)
      to reconfigure the package and apply the changes.
      debconf is extensively used for pre-seeding configuration prior to installation
      rather than modifying configurations.
      So, while dpkg-reconfigure does use debconf data, it is not always authoritative
      and you may need to check how your package is handled.
    - Also note dpkg-reconfigure is a 3-phase process. It invokes the
      control scripts from the C(/var/lib/dpkg/info) directory with the
      C(<package>.prerm  reconfigure <version>),
      C(<package>.config reconfigure <version>) and C(<package>.postinst control <version>) arguments.
    - The main issue is that the C(<package>.config reconfigure) step for many packages
      will first reset the debconf database (overriding changes made by this module) by
      checking the on-disk configuration. If this is the case for your package then
      dpkg-reconfigure will effectively ignore changes made by debconf.
    - However as dpkg-reconfigure only executes the C(<package>.config) step if the file
      exists, it is possible to rename it to C(/var/lib/dpkg/info/<package>.config.ignore)
      before executing C(dpkg-reconfigure -f noninteractive <package>) and then restore it.
      This seems to be compliant with Debian policy for the .config file.
requirements:
- debconf
- debconf-utils
options:
  name:
    description:
      - Name of package to configure.
    type: str
    required: true
    aliases: [ pkg ]
  question:
    description:
      - A debconf configuration setting.
    type: str
    aliases: [ selection, setting ]
  vtype:
    description:
      - The type of the value supplied.
      - It is highly recommended to add C(no_log=True) to task while specifying O(vtype=password).
      - V(seen) was added in Ansible 2.2.
    type: str
    choices: [ boolean, error, multiselect, note, password, seen, select, string, text, title ]
  value:
    description:
      -  Value to set the configuration to.
    type: str
    aliases: [ answer ]
  unseen:
    description:
      - Do not set 'seen' flag when pre-seeding.
    type: bool
    default: false
author:
- Brian Coca (@bcoca)
az
- name: Set default locale to fr_FR.UTF-8
  ansible.builtin.debconf:
    name: locales
    question: locales/default_environment_locale
    value: fr_FR.UTF-8
    vtype: select

- name: Set to generate locales
  ansible.builtin.debconf:
    name: locales
    question: locales/locales_to_be_generated
    value: en_US.UTF-8 UTF-8, fr_FR.UTF-8 UTF-8
    vtype: multiselect

- name: Accept oracle license
  ansible.builtin.debconf:
    name: oracle-java7-installer
    question: shared/accepted-oracle-license-v1-1
    value: 'true'
    vtype: select

- name: Specifying package you can register/return the list of questions and current values
  ansible.builtin.debconf:
    name: tzdata

- name: Pre-configure tripwire site passphrase
  ansible.builtin.debconf:
    name: tripwire
    question: tripwire/site-passphrase
    value: "{{ site_passphrase }}"
    vtype: password
  no_log: True
�#)�to_text)�
AnsibleModulec�f�|jdd�}|g}|j|�\}}}|dk7r|jd|�d|�d���d}	|jd�D]}
|
j	|�s�|
}	n|	s|jd	|�d|�d���|	j�\}}}
}||k(r|
|k(r|Sy
)Nzdebconf-get-selectionsTrzFailed to get the value 'z' from '�'��msg�
zFailed to find the value '�)�get_bin_path�run_command�	fail_json�split�
startswith)�module�pkg�question�vtype�getsel�cmd�rc�out�err�desired_line�line�dpkg�	dquestion�dvtype�dvalues               �9/usr/lib/python3/dist-packages/ansible/modules/debconf.py�get_password_valuer$�s���
�
 �
 �!9�4�
@�F��(�C��%�%�c�*�L�B��S�	�Q�w�����SV�W��X��L��	�	�$�����?�?�3���L���
����(�TW�X��Y�(4�(:�(:�(<�%�T�9�f�f��H���5���
�
�c�\�|jdd�|g}|jdj|��\}}}|dk7r|j|��i}|j	�D]G}|jdd�\}}	|	j
�||j
d�j
�<�I|S)	Nzdebconf-showT� rr�:��*)rr�joinr�
splitlinesr�strip)
rrrrrr�
selectionsr�key�values
          r#�get_selectionsr1�s������~�t�4�c�
:�C��%�%�c�h�h�s�m�4�L�B��S�	�Q�w����S��!��J���� �;���z�z�#�q�)���e�-2�[�[�]�
�3�9�9�S�>�'�'�)�*�;��r%c���|jdd�}|g}|r|jd�|dk(r|j�}dj||||g�}|j	||��S)Nzdebconf-set-selectionsTz-u�booleanr')�data)r�append�lowerr+r)	rrrrr0�unseen�setselrr4s	         r#�
set_selectionr9�sk��
�
 �
 �!9�4�
@�F��(�C�
��
�
�4���	�����
���8�8�S�(�E�5�1�2�D����c���-�-r%c��tttdddg��tdddg��tdgd��	�tdd
g��tdd�
���gd�fd��}|jd}|jd}|jd}|jd}|jd}t||�}d}d}|�v|�|�|j	d��||vrd}nY||}	|dk(r5t|�j
�}t||�j
�}	|dk(rt||||�}	||	k7rd}|r�|js(t||||||�\}
}}|
r|j	|��||i}||vr|||i}nd||<i}
|jr&|j�}|j|�||d�}
|j|||||
��|j|||��y)N�strTr)�type�required�aliases�	selection�setting)r<r>)
r3�error�multiselect�note�password�seen�select�string�text�title)r<�choices�answer�boolF)r<�default)�namerrr0r7)rrr0)�
argument_spec�required_together�supports_check_moderNrrr0r7rzAwhen supplying a question you must supply a valid vtype and valuerr3rD)�before�after)�changedr�current�previous�diff)rTrrU)r�dict�paramsr1rrr6r$�
check_moder9�_diff�copy�update�	exit_json)rrrrr0r7�prevrTr�existingr�e�curr�	diff_dictrSs               r#�mainrd�s��
���5�4�%��A��u�{�I�.F�G��E�,P�Q��E�H�:�6��V�U�3�
�:�;� �
�F��-�-��
�C��}�}�Z�(�H��M�M�'�"�E��M�M�'�"�E�
�]�]�8�
$�F��&�#�&�D��G�
�C����=�E�M����!d��e��4���G��H�~�H��	�!����,�,�.��"�4��>�2�8�8�:���
�"�-�f�c�8�U�K���� ����� � �&�v�s�H�e�U�F�S�J�B��Q��� � �Q� �'��%� ���t���d�8�n�-�D��D��N��	��<�<��I�I�K�E��L�L���#'�%�8�I�����c�4�$�U^��_�
���W�#�t��<r%�__main__N)�
__future__rrrr<�
__metaclass__�
DOCUMENTATION�EXAMPLES�RETURN�+ansible.module_utils.common.text.convertersr�ansible.module_utils.basicrr$r1r9rd�__name__�r%r#�<module>ros[��A�@��
�N�
�`!��F
��?�4��,
� 
.�B=�J�z���F�r%

Youez - 2016 - github.com/yon3zu
LinuXploit