Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/system/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/system/debconf.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zdd
l	m
Z
ddlmZd�Z
d
�Zd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontstableinterfacetstatustcoretsupported_bys7
---
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"
notes:
    - This module requires the command line debconf tools.
    - A number of 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 I(no_log=True) to task while handling sensitive information using this module.
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 I(no_log=True) to task while specifying I(vtype=password).
      - C(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: no
author:
- Brian Coca (@bcoca)
s*
- name: Set default locale to fr_FR.UTF-8
  debconf:
    name: locales
    question: locales/default_environment_locale
    value: fr_FR.UTF-8
    vtype: select

- name: Set to generate locales
  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
  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
  debconf:
    name: tzdata

- name: Pre-configure tripwire site passphrase
  debconf:
    name: tripwire
    question: tripwire/site-passphrase
    value: "{{ site_passphrase }}"
    vtype: password
  no_log: True
(tto_text(t
AnsibleModulec
C`s�|jdt�|g}|jdj|��\}}}|dkrX|jd|�ni}xK|j�D]=}|jdd�\}}	|	j�||jd�j�<qkW|S(Nsdebconf-showt itmsgt:it*(tget_bin_pathtTruetrun_commandtjoint	fail_jsont
splitlinestsplittstrip(
tmoduletpkgtcmdtrctoutterrt
selectionstlinetkeytvalue((sB/usr/lib/python2.7/site-packages/ansible/modules/system/debconf.pytget_selectionshs!#c	C`s�|jdt�}|g}|r1|jd�n|dkrj|dkrRd}qj|dkrjd}qjndj||||g�}|j|d	|�S(
Nsdebconf-set-selectionss-utbooleanRttruetFalsetfalseR
tdata(RRtappendRR(	RRtquestiontvtypeRtunseentsetselRR%((sB/usr/lib/python2.7/site-packages/ansible/modules/system/debconf.pyt
set_selectionxs		cC`s�tdtdtdddtddg�dtdddd	d
g�dtdddd
dddddddddg
�dtddddg�dtdd��ddddgfdt�}|jd}|jd}|jd}|jd}|jd}t||�}t}d}|dk	r�|dks=|dkrP|jdd�n||kret}q�||}	|d
kr�t|�j	�}t||�j	�}	n||	kr�t}q�n|r�|j
s
t||||||�\}
}}|
r
|jd|�q
ni||6}||kr:i|||6}n
d||<|jr}|j
�}
|
j|�i|d 6|
d!6}ni}|jd"|d|d#|d$|d%|�n|jd"|d|d#|�dS(&Nt
argument_spectnamettypetstrtrequiredtaliasesRR't	selectiontsettingR(tchoicesR!terrortmultiselecttnotetpasswordtseentselecttstringttextttitleRtanswerR)tbooltrequired_togethertsupports_check_modetRsAwhen supplying a question you must supply a valid vtype and valuetbeforetaftertchangedtcurrenttprevioustdiff(R	tdictRtparamsR R#tNoneRRtlowert
check_modeR+t_difftcopytupdatet	exit_json(RRR'R(RR)tprevRERtexistingRtetcurrRDt	diff_dict((sB/usr/lib/python2.7/site-packages/ansible/modules/system/debconf.pytmain�sX3	




	
	$

	
+t__main__N(t
__future__RRRR.t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStansible.module_utils._textRtansible.module_utils.basicR	R R+RWt__name__(((sB/usr/lib/python2.7/site-packages/ansible/modules/system/debconf.pyt<module>s


3#			C

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]