AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 18.216.86.171
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python2.7/site-packages/ansible/plugins/strategy/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /lib/python2.7/site-packages/ansible/plugins/strategy/free.pyc
�
��\c@`s�ddlmZmZmZeZdZddlZddlm	Z
ddlmZddl
mZddlmZddlmZdd	lmZdd
lmZyddlmZWn*ek
r�ddlmZe�ZnXd
efd��YZdS(i(tabsolute_importtdivisiontprint_functions�
    strategy: free
    short_description: Executes tasks on each host independently
    description:
        - Task execution is as fast as possible per host in batch as defined by C(serial) (default all).
          Ansible will not wait for other hosts to finish the current task before queuing the next task for a host that has finished.
          Once a host is done with the play, it opens it's slot to a new host that was waiting to start.
    version_added: "2.0"
    author: Ansible Core Team
N(t	constants(tAnsibleError(tIncludedFile(t
action_loader(tStrategyBase(tTemplar(tto_text(tdisplay(tDisplaytStrategyModulecB`s#eZd�Zd�Zd�ZRS(cC`s3g|D](}||jkr|j|r|^qS(s?
        Filter notified hosts accordingly to strategy
        (t_flushed_hosts(tselftnotified_hoststhost((sA/usr/lib/python2.7/site-packages/ansible/plugins/strategy/free.pyt_filter_notified_hosts4s
cC`s#tt|�j|�t|_dS(N(tsuperRt__init__tFalset_host_pinned(Rttqm((sA/usr/lib/python2.7/site-packages/ansible/plugins/strategy/free.pyR=scC`sKd}|jj}t|j�}t}x�|r|jjr|j|�}t|�dkrx|jjd�t}Pnt}|}g}	x�tr�||}
t	j
d|
�|
j�}|j|
dt�\}}
t	j
d|d|�t	j
d|
d|�||jj
kr)|
r)t}t	j
dd|�||jksQ|j|rt|j|<|j|
�\}}
ytj|
jd	t�}Wntk
r�d(}nXt	j
d
d|�|jjd|jd|
d|
�}|j|d|j�td
|jd|�}t	j
dd|�y>t|j|
jdt�dd�|
_t	j
dd|�Wnt	j
dd|�nX|j|
j�p�|o�t|dt�}|r�|r�t|dt�r�td|
jd|
j ��q�t	j!d�n|
j"rf|
j"j#|
�rf|
j"j$d(ks<|
j"j$rf|
j"j$j%rft	j
d|
d|�|j|=q�qfn|
jdkr�|j&|
||d|
�t|j|<q&|j's�|j(|
|�r&|
j)r�t	j!d�n|jjd|
dt�|j*|
|
||�|d8}~q&q)t	j
d |�n|j+rN|dkrN|rN|}Pn|d7}|t|�dkrwd}n||kr�Pq�q�W|j,|�}|	j-|�|t|�7}|j.|�y+t/j0|	d!|d
|jd"|j�}Wntk
r}|jj1SXt|�dkrt2d#�|D��}x�|D]�}t	j
d$|�y�|j3r�|j4|�}|j5d|jd"|jd
|j�\}}|jj6g|D]}|j7D]}|^q�q��n|j8|d!|�}WnJtk
r2}x|j9D]}
|j:|
�qWt	j!t;|��q;nXxu|D]m}|jjd|jd|j<�}|j=||�}x1|D])}
|
|j9krz||
j>|�qzqzWq:Wt	j
d%|�q;Wt	j
d&t|��x"|D]}
|j?|
||
�q�Wt	j
d'�nt@jAtBjC�q*W|jD|�}tEtF|�jG|||�S()sm
        The "free" strategy is a bit more complex, in that it allows tasks to
        be sent to hosts as quickly as they can be processed. This means that
        some hosts may finish very quickly if run tasks result in little or no
        work being done versus other systems.

        The algorithm used here also tries to be more "fair" when iterating
        through hosts by remembering the last host in the list to be given a task
        and starting the search from there as opposed to the top of the hosts
        list again, which would end up favoring hosts near the beginning of the
        list.
        it!v2_playbook_on_no_hosts_remainingsnext free host: %stpeeksfree host state: %sRsfree host task: %ssthis host has work to dot
class_onlysgetting variablestplayttasktloadert	variablessdone getting variablestfail_on_undefinedt	nonstringtemptysdone templatings!templating failed for some reasontBYPASS_HOST_LOOPs�The '%s' module bypasses the host loop, which is currently not supported in the free strategy and would instead execute for every host in the inventory list.tobjs�Using run_once with the free strategy is not currently supported. This task will still be executed for every host in the inventory list.s)'%s' skipped because role has already runtmetattarget_hostspUsing any_errors_fatal with the free strategy is not supported, as tasks are executed independently on each hosttv2_playbook_on_task_starttis_conditionalis%s is blocked, skipping for nowtiteratortvariable_managercs`s|]}|gfVqdS(N((t.0R((sA/usr/lib/python2.7/site-packages/ansible/plugins/strategy/free.pys	<genexpr>�sscollecting new blocks for %ss!done collecting new blocks for %ss@adding all collected blocks from %d included file(s) to iterators(done adding collected blocks to iteratorN(Ht_tqmtRUN_OKtlent_workerstTruet_terminatedtget_hosts_leftt
send_callbackRR
tdebugtget_nametget_next_task_for_hostt_unreachable_hostst_blocked_hostsRtgettactiontKeyErrortNonet_variable_managertget_varst_playtadd_tqm_variablesRt_loaderR	ttemplatetnametrun_oncetgetattrRt_dstwarningt_rolethas_runt	_metadatatallow_duplicatest
_execute_metat_stept
_take_steptany_errors_fatalt_queue_taskRt_process_pending_resultstextendtupdate_active_connectionsRtprocess_include_resultst	RUN_ERRORtdictt_is_rolet_copy_included_filetget_block_listtupdate_handler_listtblockt_load_included_filet_hoststmark_host_failedtstrt_parenttfilter_tagged_taskstappendt	add_tasksttimetsleeptCtDEFAULT_INTERNAL_POLL_INTERVALt_wait_on_pending_resultsRRtrun(RR'tplay_contextt	last_hosttresulttworkers_freet
work_to_dot
hosts_leftt
starting_hostthost_resultsRt	host_nametstateRR8t	task_varsttemplarRBtresultstincluded_filestet
all_blockst
included_filetnew_irt
new_blocksthandler_blockst
handler_blockthandlert	new_blocktfinal_block((sA/usr/lib/python2.7/site-packages/ansible/plugins/strategy/free.pyRgAs�	



$'*.
		
	
	

	
				6
!

(t__name__t
__module__RRRg(((sA/usr/lib/python2.7/site-packages/ansible/plugins/strategy/free.pyR2s			(t
__future__RRRttypet
__metaclass__t
DOCUMENTATIONRbtansibleRRdtansible.errorsRtansible.playbook.included_fileRtansible.plugins.loaderRtansible.plugins.strategyRtansible.templateRtansible.module_utils._textR	t__main__R
tImportErrortansible.utils.displayRR(((sA/usr/lib/python2.7/site-packages/ansible/plugins/strategy/free.pyt<module>s 



Anon7 - 2022
AnonSec Team