??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó ßUdac@`s¬ddlmZmZmZeZddlZddlmZyddl m Z m Z Wne k rknXddl mZddlmZmZdefd„ƒYZdS( i(tabsolute_importtdivisiontprint_functionN(tsleep(tAPIErrortNotFound(t to_native(tAnsibleDockerClientt LooseVersiontAnsibleDockerSwarmClientcB`s’eZd„Zd„Zdd„Zd„Zd„Zd„Zddd„Z de d„Z d „Z d d „Z d „Zd „Ze d„ZRS(cK`stt|ƒj|dS(N(tsuperR t__init__(tselftkwargs((sE/usr/lib/python2.7/site-packages/ansible/module_utils/docker/swarm.pyR scC`sˆy|jƒ}Wn*tk r<}|jdt|ƒƒnX|r„tj|dtƒ}tj|ƒ}|ddr„|ddSndS(sé Get the 'NodeID' of the Swarm node or 'None' if host is not in Swarm. It returns the NodeID of Docker host the module is executed on :return: NodeID of host or 'None' if not part of Swarm s%Failed to get node information for %st ensure_asciitSwarmtNodeIDN( tinfoRtfailRtjsontdumpstFalsetloadstNone(R Rtexctjson_strt swarm_info((sE/usr/lib/python2.7/site-packages/ansible/module_utils/docker/swarm.pytget_swarm_node_idscC`sß|d kr˜y|jƒ}Wntk r<|jdƒnX|r”tj|dtƒ}tj|ƒ}|ddrytS|ddd kr”tSntSy|j d |ƒ}Wntk rÂd SX|d d k r×tStSd S( sý Checking if host is part of Docker Swarm. If 'node_id' is not provided it reads the Docker host system information looking if specific key in output exists. If 'node_id' is provided then it tries to read node information assuming it is run on Swarm manager. The get_node_inspect() method handles exception if it is not executed on Swarm manager :param node_id: Node identifier :return: bool: True if node is part of Swarm, False otherwise sFailed to get host information.RRRtLocalNodeStatetactivetpendingtlockedtnode_idNtID(RRR( RRRRRRRRtTruetget_node_inspect(R R RRRt node_info((sE/usr/lib/python2.7/site-packages/ansible/module_utils/docker/swarm.pytcheck_if_swarm_node2s(   cC`s+y|jƒtSWntk r&tSXdS(s Checks if node role is set as Manager in Swarm. The node is the docker host on which module action is performed. The inspect_swarm() will fail if node is not a manager :return: True if node is Swarm Manager, False otherwise N(t inspect_swarmR"RR(R ((sE/usr/lib/python2.7/site-packages/ansible/module_utils/docker/swarm.pytcheck_if_swarm_managerVs   cC`s |jƒs|jdƒndS(sn If host is not a swarm manager then Ansible task on this host should end with 'failed' state sAError running docker swarm module: must run on swarm manager nodeN(R'R(R ((sE/usr/lib/python2.7/site-packages/ansible/module_utils/docker/swarm.pytfail_task_if_not_swarm_managerds cC`s!|jƒr|jƒ rtStS(s Checks if node role is set as Worker in Swarm. The node is the docker host on which module action is performed. Will fail if run on host that is not part of Swarm via check_if_swarm_node() :return: True if node is Swarm Worker, False otherwise (R%R'R"R(R ((sE/usr/lib/python2.7/site-packages/ansible/module_utils/docker/swarm.pytcheck_if_swarm_workerksicC`s‘|dkrd}n|dkr0|jƒ}nxZtd|ƒD]I}|dkr_tdƒn|jd|ƒ}|dddkr@tSq@WtS( s[ Checks if node status on Swarm manager is 'down'. If node_id is provided it query manager about node specified in parameter, otherwise it query manager itself. If run on Swarm Worker node or host that is not part of Swarm it will fail the playbook :param repeat_check: number of check attempts with 5 seconds delay between them, by default check only once :param node_id: node ID or name, if None then method will try to get node_id of host module run on :return: True if node is part of swarm but its state is down, False otherwise iiiR tStatustStatetdownN(RRtrangeRR#R"R(R R t repeat_checktretryR$((sE/usr/lib/python2.7/site-packages/ansible/module_utils/docker/swarm.pytcheck_if_swarm_node_is_downws     cC`s“|dkr|jƒ}n|dkr7|jdƒny|jd|ƒ}Wnˆtk r´}|jdkr~|jdƒn|jdkrš|ršdSn|jdt|ƒƒn$tk r×}|jd|ƒnXtj |dt ƒ}tj |ƒ}d |kr|d j d ƒr|d d j d ƒ}|d krm|d d jd d ƒdpg|dd }n|dd }||dd s