Anons79 Mini Shell

Directory : /proc/self/root/lib/python2.7/site-packages/ansible/cli/arguments/
Upload File :
Current File : //proc/self/root/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyc

�
�Udac@`sddlmZmZmZeZddlZddlZddlZddl	Z	ddl
Z	ddlZddlZddl
Z
ddlZddlmZddlmZddlmZddlmZdejfd��YZd	ejfd
��YZdejfd��YZd
ejfd��YZd�Zed�Zd�Z d�Z!dd�Z#dddd�Z$d�Z%d�Z&d�Z'd�Z(d�Z)d�Z*d�Z+d�Z,d�Z-d�Z.d �Z/dd!�Z0d"�Z1d#�Z2d$�Z3dS(%i(tabsolute_importtdivisiontprint_functionN(t	constants(t	to_native(t__version__(tunfrackpathtSortingHelpFormattercB`seZd�ZRS(cC`s5t|dtjd��}tt|�j|�dS(Ntkeytoption_strings(tsortedtoperatort
attrgettertsuperRt
add_arguments(tselftactions((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyRs(t__name__t
__module__R(((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyRstAnsibleVersioncB`seZdd�ZRS(cC`s3ttt|d���}t|�|j�dS(Ntprog(Rtversiontgetattrtprinttexit(Rtparsert	namespacetvaluest
option_stringtansible_version((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyt__call__!s
N(RRtNoneR(((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyR stUnrecognizedArgumentcB`s/eZededddd�Zdd�ZRS(ic		C`sAtt|�jd|d|d|d|d|d|d|�dS(NR	tdesttnargstconsttdefaulttrequiredthelp(R
R t__init__(	RR	R!R#R$R%R&tmetavarR"((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyR'(s*cC`s|jd|�dS(Nsunrecognized arguments: %s(terror(RRRRR((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyR,sN(RRtTrueRtFalseR'R(((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyR 'stPrependListActionc	B`s;eZdZdddddeddd�Zdd�ZRS(snA near clone of ``argparse._AppendAction``, but designed to prepend list values
    instead of appending.
    cC`s�|dkrtd��n|dk	rL|tjkrLtdtj��ntt|�jd|d|d|d|d|d	|d
|d|d|	d
|
�
dS(Nis�nargs for append actions must be > 0; if arg strings are not supplying the value to append, the append const action may be more appropriates nargs must be %r to supply constR	R!R"R#R$ttypetchoicesR%R&R((t
ValueErrorRtargparsetOPTIONALR
R,R'(RR	R!R"R#R$R-R.R%R&R(((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyR'4scC`sBtjt||jg��}||dd+t||j|�dS(Ni(tcopytensure_valueR!tsetattr(RRRRRtitems((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyRIs
N(RRt__doc__RR+R'R(((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyR,0scC`s8t||d�dkr+t|||�nt||�S(N(RRR4(Rtnametvalue((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyR3Osc`s�fd�}|S(s=Turn an Option's data into a single path in Ansible locationsc`sO�r5g|jtj�D]}|rt|�^qS|dkrE|St|�S(Nt-(tsplittostpathsepR(R8tx(R<(sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytinnerZs
/((R<R>((R<sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytunfrack_pathXsc

C`sd}tjj|�r�tjj|�r�yVtjt|��jd�}tjj	|�rf|}ntjj
|d |�}Wq�ttfk
r�dSXnttjj
|d���M}|j
�jd�}|jd�r�tjj
||d�}nd}WdQX|rdtjj|�rdd	j
|jd	�d
�}t|��}|j
�d }WdQXn%|d }d}tjj
|d�}tjtj|�j�}tjd
kr�tj}	n	tj}	dj||tjd|�t|	d��}nd}|S(sC returns a string containing git branch, commit id and commit date tgitdiri����ttHEADs
sref:iNt/ii
s
detached HEADis)({0} {1}) last updated {2} (GMT {3:+04d})s%Y/%m/%d %H:%M:%Si���(RR;tpathtexiststisfiletyamlt	safe_loadtopentgettisabstjointIOErrortAttributeErrortreadlinetrstript
startswithR:ttimet	localtimetstattst_mtimetdaylightttimezonetaltzonetformattstrftimetint(
t	repo_pathtresultR@tftlinetbranch_pathtbranchtcommittdatetoffset((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyt_git_repo_infoes:	
	1c	
C`stjjtjjt�ddd�}tjj|d�}t|�}tjj|d�}tjj|�ss|St|���}x�|D]}|j�j	d�}|ddkr�|d}ttjj||d��}|s�d|}n|d	j
||�7}q�q�WWdQX|S(
Ns..s.gits.gitmodulest iRDis- not found - use git submodule update --init s
  {0}: {1}(R;RDRLtdirnamet__file__ReRERItstripR:RY(	tbasedirR\R]t
submodulesR^R_ttokenstsubmodule_pathtsubmodule_info((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyt_gitinfo�s '


#cC`s�|rdj|tf�}nt}t�}|rI|dj|�}n|dtj7}tjdkrrd}n	tj}|d|}|ddjtj	�}|dt
jd	}|d
djt
jj
��}|S(
s return ansible version Rfs {0}s
  config file = %ssDefault w/o overridess%
  configured module search path = %ss&
  ansible python module location = %st:s
  executable location = %sis
  python version = %sRAN(RLRRoRYtCtCONFIG_FILEtDEFAULT_MODULE_PATHRtansiblet__path__tsystargvRt
splitlines(RR]tgitinfotcpath((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyR�s			 RAcC`s]tjd|dtd|d|dd�}d}|jdd	td
dd|�t|�|S(
s:
    Create an options parser for all ansible scripts
    Rtformatter_classtepilogtdescriptiontconflict_handlertresolves�show program's version number, config file location, configured module search path, module location, executable location and exits	--versiontactionR"iR&(R0tArgumentParserRtadd_argumentRtadd_verbosity_options(RtusagetdescR|Rtversion_help((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytcreate_base_parser�s		
cC`s/|jdddddtjdddd	�d
S(sAdd options for verbositys-vs	--verboseR!t	verbosityR$R�tcountR&sBverbose mode (-vvv for more, -vvvv to enable connection debugging)N(R�RqtDEFAULT_VERBOSITY(R((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyR��s$cC`s^|jdddtjdtddddtj�|jd	d
dddtdddd
�dS(s5Add options for commands which can launch async taskss-Ps--pollR$R-R!t
poll_intervalR&s.set the poll interval if using -B (default=%s)s-Bs--backgroundtsecondsis9run asynchronously, failing after X seconds (default=N/A)N(R�RqtDEFAULT_POLL_INTERVALR[(R((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytadd_async_options�s$!c
C`s5|jddtjjd�dddddd	�d
S(s9Add options for commands which can set a playbook basedirs--playbook-dirR$tPLAYBOOK_DIRR!RjR�tstoreR&s�Since this tool does not use playbooks, use this as a substitute playbook directory.This sets the relative path for many features including roles/ group_vars/ etc.N(R�Rqtconfigtget_config_value(R((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytadd_basedir_options�s*cC`sv|jdddtdddddd	�|jd
dddddd�|jd
ddtjdddddd�dS(sKAdd options for commands which can run with diagnostic information of taskss-Cs--checkR$R!tcheckR�t
store_trueR&sRdon't make any changes; instead, try to predict some of the changes that may occurs--syntax-checktsyntaxs=perform a syntax check on the playbook, but do not execute its-Ds--difftdiffshwhen changing (small) files and templates, show the differences in those files; works great with --checkN(R�R+RqtDIFF_ALWAYS(R((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytadd_check_options�s!$cC`s�|jdd�}|jdddtjdddd	d
d�|jdd
dtjddd
ddt��|jdddtjddd
dtj�|jdddddtjd
dtj�|jdddtjdt	ddd
dtj�|jdddddd
d �|jd!dddd"d
d#�|jd$dddd%d
d&�|jd'dddd(d
d)�|j|�d*S(+s@Add options for commands which need to connection to other hostssConnection Optionss+control as whom and how to connect to hostss-ks
--ask-passR$R!task_passR�R�R&sask for connection passwords
--private-keys
--key-filetprivate_key_files,use this file to authenticate the connectionR-s-us--usertremote_users!connect as this user (default=%s)s-cs--connectiont
connections#connection type to use (default=%s)s-Ts	--timeoutttimeouts7override the connection timeout in seconds (default=%s)s--ssh-common-argsRAtssh_common_argssDspecify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)s--sftp-extra-argstsftp_extra_argss:specify extra arguments to pass to sftp only (e.g. -f, -l)s--scp-extra-argstscp_extra_argss5specify extra arguments to pass to scp only (e.g. -l)s--ssh-extra-argstssh_extra_argss5specify extra arguments to pass to ssh only (e.g. -R)N(
tadd_argument_groupR�RqtDEFAULT_ASK_PASStDEFAULT_PRIVATE_KEY_FILER?tDEFAULT_REMOTE_USERtDEFAULT_TRANSPORTtDEFAULT_TIMEOUTR[(Rt
connect_group((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytadd_connect_options�s($$cC`s6|jdddddtjdtddtj�d	S(
s7Add options for commands that can fork worker processess-fs--forksR!tforksR$R-R&s8specify number of parallel processes to use (default=%s)N(R�Rqt
DEFAULT_FORKSR[(R((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytadd_fork_optionss$c
C`sm|jddddddddd	�|jd
dddddd
�|jdddtjdddd�dS(s/Add options for commands that utilize inventorys-is--inventorys--inventory-fileR!t	inventoryR�tappendR&sXspecify inventory host path or comma separated host list. --inventory-file is deprecateds--list-hostst	listhostsR�s@outputs a list of matching hosts; does not execute anything elses-ls--limitR$tsubsets5further limit selected hosts to an additional patternN(R�RqtDEFAULT_SUBSET(R((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytadd_inventory_optionssc
C`sK|jddtjdddddd�|jd	dd
dddd�dS(
sJAdd options for commands which can launch meta tasks from the command lines--force-handlersR$R!tforce_handlersR�R�R&s!run handlers even if a task failss
--flush-cachetflush_caches0clear the fact cache for every host in inventoryN(R�RqtDEFAULT_FORCE_HANDLERS(R((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytadd_meta_optionss!c
C`s]tjjd�jdd�}|jdddddd
dd	|d
tdt�dt�d
S(s*Add options for commands that load modulesRsR$RAs-Ms
--module-pathR!tmodule_pathR&s>prepend colon-separated path(s) to module library (default=%s)R-R<R�N(	RqR�tget_configuration_definitionRJR�RR?R*R,(RR�((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytadd_module_options$s
c	C`sH|jdddddddd�|jd	d
dddddd
�dS(s6Add options for commands which can change their outputs-os
--one-lineR!tone_lineR�R�R&scondense outputs-ts--treettreeR$slog output to this directoryN(R�R(R((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytadd_output_options,scC`s�|jdd�}|jdddtjdddd	d
d�|jddd
dtjd
d�|jddddddtd
dtj�t|d|�dS(s�
    Add options for commands which can run tasks as another user

    Note that this includes the options from add_runas_prompt_options().  Only one of these
    functions should be used.
    sPrivilege Escalation Optionss8control how and which user you become as on target hostss-bs--becomeR$R�R�R!tbecomeR&s>run operations with become (does not imply password prompting)s--become-methodt
become_methodsoprivilege escalation method to use (default=%(default)s), use `ansible-doc -t become -l` to list valid choices.s
--become-usertbecome_userR-s(run operations as this user (default=%s)trunas_groupN(	R�R�RqtDEFAULT_BECOMEtDEFAULT_BECOME_METHODRtstrtDEFAULT_BECOME_USERtadd_runas_prompt_options(RR�((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytadd_runas_options4s$cC`s]|dkr!|jdd�}n|jddddddd	tjd
d�|j|�dS(
s�
    Add options for commands which need to prompt for privilege escalation credentials

    Note that add_runas_options() includes these options already.  Only one of the two functions
    should be used.
    sPrivilege Escalation Optionss8control how and which user you become as on target hostss-Ks--ask-become-passR!tbecome_ask_passR�R�R$R&s%ask for privilege escalation passwordN(RR�R�RqtDEFAULT_BECOME_ASK_PASS(RR�((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyR�Is		cC`s,|jddddddddd	g�d
S(s(Add options for commands that run a tasks-es--extra-varsR!t
extra_varsR�R�R&sNset additional variables as key=value or YAML/JSON, if filename prepend with @R$N(R�(R((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytadd_runtask_options[scC`sW|jdddddtjdddd	�|jd
dddtjdddd�d
S(s8Add options for commands which can run a subset of taskss-ts--tagsR!ttagsR$R�R�R&s1only run plays and tasks tagged with these valuess--skip-tagst	skip_tagss=only run plays and tasks whose tags do not match these valuesN(R�RqtTAGS_RUNt	TAGS_SKIP(R((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytadd_subset_optionsas$!cC`s�|jddgdddddtdd	�|j�}|jd
dtjdddddd
�|jddgdddddt�dd�dS(s#Add options for loading vault filess
--vault-idR$R!t	vault_idsR�R�R-R&sthe vault identity to uses--ask-vault-passtask_vault_passR�sask for vault passwords--vault-password-filetvault_password_filessvault password fileN(R�R�tadd_mutually_exclusive_groupRqtDEFAULT_ASK_VAULT_PASSR?(Rt
base_group((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pytadd_vault_optionsis$!(4t
__future__RRRR-t
__metaclass__R2RR0R;tos.pathRvRRRGRtRRqtansible.module_utils._textRtansible.releaseRtansible.utils.pathRt
HelpFormatterRtActionRR R,R3R+R?ReRoRRR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�(((sH/usr/lib/python2.7/site-packages/ansible/cli/arguments/option_helpers.pyt<module>sN			
	*								
						

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