a ì)gáÜã@sìddlmZmZmZeZdZdZdZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlmZddlmZmZddlmZdd lmZdd lmZdd lmZmZd d „ZdUdd„Z dd„Z!dd„Z"dd„Z#dd„Z$dVdd„Z%dd„Z&dWdd„Z'd d!„Z(d"d#„Z)d$d%„Z*d&d'„Z+d(d)„Z,d*d+„Z-d,d-„Z.d.d/„Z/d0d1„Z0d2d3„Z1d4d5„Z2d6d7„Z3dXd8d9„Z4d:d;„Z5dd?„Z7d@dA„Z8dZdBdC„Z9dDdE„Z:dFdG„Z;dHdI„ZdNdO„Z?dPdQ„Z@dRdS„ZAeBdTkrèeAƒdS)[é)Úabsolute_importÚdivisionÚprint_functionaú" --- module: git author: - "Ansible Core Team" - "Michael DeHaan" version_added: "0.0.1" short_description: Deploy software (or files) from git checkouts description: - Manage I(git) checkouts of repositories to deploy files or software. extends_documentation_fragment: action_common_attributes options: repo: description: - git, SSH, or HTTP(S) protocol address of the git repository. type: str required: true aliases: [ name ] dest: description: - The path of where the repository should be checked out. This is equivalent to C(git clone [repo_url] [directory]). The repository named in I(repo) is not appended to this path and the destination directory must be empty. This parameter is required, unless I(clone) is set to C(false). type: path required: true version: description: - What version of the repository to check out. This can be the literal string C(HEAD), a branch name, a tag name. It can also be a I(SHA-1) hash, in which case I(refspec) needs to be specified if the given revision is not already available. type: str default: "HEAD" accept_hostkey: description: - Will ensure or not that "-o StrictHostKeyChecking=no" is present as an ssh option. - Be aware that this disables a protection against MITM attacks. - Those using OpenSSH >= 7.5 might want to set I(ssh_opts) to 'StrictHostKeyChecking=accept-new' instead, it does not remove the MITM issue but it does restrict it to the first attempt. type: bool default: 'no' version_added: "1.5" accept_newhostkey: description: - As of OpenSSH 7.5, "-o StrictHostKeyChecking=accept-new" can be used which is safer and will only accepts host keys which are not present or are the same. if C(true), ensure that "-o StrictHostKeyChecking=accept-new" is present as an ssh option. type: bool default: 'no' version_added: "2.12" ssh_opts: description: - Options git will pass to ssh when used as protocol, it works via C(git)'s GIT_SSH/GIT_SSH_COMMAND environment variables. - For older versions it appends GIT_SSH_OPTS (specific to this module) to the variables above or via a wrapper script. - Other options can add to this list, like I(key_file) and I(accept_hostkey). - An example value could be "-o StrictHostKeyChecking=no" (although this particular option is better set by I(accept_hostkey)). - The module ensures that 'BatchMode=yes' is always present to avoid prompts. type: str version_added: "1.5" key_file: description: - Specify an optional private key file path, on the target host, to use for the checkout. - This ensures 'IdentitiesOnly=yes' is present in ssh_opts. type: path version_added: "1.5" reference: description: - Reference repository (see "git clone --reference ..."). version_added: "1.4" remote: description: - Name of the remote. type: str default: "origin" refspec: description: - Add an additional refspec to be fetched. If version is set to a I(SHA-1) not reachable from any branch or tag, this option may be necessary to specify the ref containing the I(SHA-1). Uses the same syntax as the C(git fetch) command. An example value could be "refs/meta/config". type: str version_added: "1.9" force: description: - If C(true), any modified files in the working repository will be discarded. Prior to 0.7, this was always C(true) and could not be disabled. Prior to 1.9, the default was C(true). type: bool default: 'no' version_added: "0.7" depth: description: - Create a shallow clone with a history truncated to the specified number or revisions. The minimum possible value is C(1), otherwise ignored. Needs I(git>=1.9.1) to work correctly. type: int version_added: "1.2" clone: description: - If C(false), do not clone the repository even if it does not exist locally. type: bool default: 'yes' version_added: "1.9" update: description: - If C(false), do not retrieve new revisions from the origin repository. - Operations like archive will work on the existing (old) repository and might not respond to changes to the options version or remote. type: bool default: 'yes' version_added: "1.2" executable: description: - Path to git executable to use. If not supplied, the normal mechanism for resolving binary paths will be used. type: path version_added: "1.4" bare: description: - If C(true), repository will be created as a bare repo, otherwise it will be a standard repo with a workspace. type: bool default: 'no' version_added: "1.4" umask: description: - The umask to set before doing any checkouts, or any other repository maintenance. type: raw version_added: "2.2" recursive: description: - If C(false), repository will be cloned without the --recursive option, skipping sub-modules. type: bool default: 'yes' version_added: "1.6" single_branch: description: - Clone only the history leading to the tip of the specified revision. type: bool default: 'no' version_added: '2.11' track_submodules: description: - If C(true), submodules will track the latest commit on their master branch (or other branch specified in .gitmodules). If C(false), submodules will be kept at the revision specified by the main project. This is equivalent to specifying the --remote flag to git submodule update. type: bool default: 'no' version_added: "1.8" verify_commit: description: - If C(true), when cloning or checking out a I(version) verify the signature of a GPG signed commit. This requires git version>=2.1.0 to be installed. The commit MUST be signed and the public key MUST be present in the GPG keyring. type: bool default: 'no' version_added: "2.0" archive: description: - Specify archive file path with extension. If specified, creates an archive file of the specified format containing the tree structure for the source tree. Allowed archive formats ["zip", "tar.gz", "tar", "tgz"]. - This will clone and perform git archive from local directory as not all git servers support git archive. type: path version_added: "2.4" archive_prefix: description: - Specify a prefix to add to each file path in archive. Requires I(archive) to be specified. version_added: "2.10" type: str separate_git_dir: description: - The path to place the cloned repository. If specified, Git repository can be separated from working tree. type: path version_added: "2.7" gpg_whitelist: description: - A list of trusted GPG fingerprints to compare to the fingerprint of the GPG-signed commit. - Only used when I(verify_commit=yes). - Use of this feature requires Git 2.6+ due to its reliance on git's C(--raw) flag to C(verify-commit) and C(verify-tag). type: list elements: str default: [] version_added: "2.9" requirements: - git>=1.7.1 (the command line tool) attributes: check_mode: support: full diff_mode: support: full platform: platforms: posix notes: - "If the task seems to be hanging, first verify remote host is in C(known_hosts). SSH will prompt user to authorize the first contact with a remote host. To avoid this prompt, one solution is to use the option accept_hostkey. Another solution is to add the remote host public key in C(/etc/ssh/ssh_known_hosts) before calling the git module, with the following command: ssh-keyscan -H remote_host.com >> /etc/ssh/ssh_known_hosts." az - name: Git checkout ansible.builtin.git: repo: 'https://foosball.example.org/path/to/repo.git' dest: /srv/checkout version: release-0.22 - name: Read-write git checkout from github ansible.builtin.git: repo: git@github.com:mylogin/hello.git dest: /home/mylogin/hello - name: Just ensuring the repo checkout exists ansible.builtin.git: repo: 'https://foosball.example.org/path/to/repo.git' dest: /srv/checkout update: no - name: Just get information about the repository whether or not it has already been cloned locally ansible.builtin.git: repo: 'https://foosball.example.org/path/to/repo.git' dest: /srv/checkout clone: no update: no - name: Checkout a github repo and use refspec to fetch all pull requests ansible.builtin.git: repo: https://github.com/ansible/ansible-examples.git dest: /src/ansible-examples refspec: '+refs/pull/*:refs/heads/*' - name: Create git archive from repo ansible.builtin.git: repo: https://github.com/ansible/ansible-examples.git dest: /src/ansible-examples archive: /tmp/ansible-examples.zip - name: Clone a repo with separate git directory ansible.builtin.git: repo: https://github.com/ansible/ansible-examples.git dest: /src/ansible-examples separate_git_dir: /src/ansible-examples.git - name: Example clone of a single branch ansible.builtin.git: repo: https://github.com/ansible/ansible-examples.git dest: /src/ansible-examples single_branch: yes version: master - name: Avoid hanging when http(s) password is missing ansible.builtin.git: repo: https://github.com/ansible/could-be-a-private-repo dest: /src/from-private-repo environment: GIT_TERMINAL_PROMPT: 0 # reports "terminal prompts disabled" on missing password # or GIT_ASKPASS: /bin/true # for git before version 2.3.0, reports "Authentication failed" on missing password aR after: description: Last commit revision of the repository retrieved during the update. returned: success type: str sample: 4c020102a9cd6fe908c9a4a326a38f972f63a903 before: description: Commit revision before the repository was updated, "null" for new repository. returned: success type: str sample: 67c04ebe40a003bda0efb34eacfb93b0cafdf628 remote_url_changed: description: Contains True or False whether or not the remote URL was changed. returned: success type: bool sample: True warnings: description: List of warnings if requested features were not available due to a too old git version. returned: error type: str sample: git version is too old to fully support the depth argument. Falling back to full checkouts. git_dir_now: description: Contains the new path of .git directory if it is changed. returned: success type: str sample: /path/to/new/git/dir git_dir_before: description: Contains the original path of .git directory if it is changed. returned: success type: str sample: /path/to/old/git/dir N)Ú LooseVersion)Ú to_nativeÚto_text)Ú AnsibleModule)Úget_best_parsable_locale)Ú get_bin_path)ÚbÚ string_typesc Csàtj |¡r|jd|d|rÜtj |d¡}zXt ||¡t|dƒ}| d|¡Wdƒn1sj0Y||d<||d<WnTt t fyÚ}z8tj |¡r²t ||¡|jdt |ƒdWYd}~n d}~00dS) Nz(Separate-git-dir path %s already exists.©Úmsgú.gitÚwz gitdir: %sZgit_dir_beforeZ git_dir_nowzUnable to move git dir. %s) ÚosÚpathÚexistsÚ fail_jsonÚjoinÚshutilÚmoveÚopenÚwriteÚIOErrorÚOSErrorr)ÚmoduleÚresultZrepo_dirZ old_repo_dirZ worktree_dirZdot_git_file_pathZ dot_git_fileÚerr©rú7/usr/lib/python3.9/site-packages/ansible/modules/git.pyÚ relocate_repo[s   ,   r!Fc CsÔd}tj |¡rÐd}zt|dƒ}| ¡}| ¡Wn*ty\|rX|rX|jd|dYn0|rÐzB| d|dd¡}|  d¡}|d }|  d d ¡} | d   d ¡}Wn*tyÎ|rÊ|rÊ|jd |dYn0|S)zExtract the head referenceNÚrzUnable to read %sr zrefs/remotes/%sÚéú éÿÿÿÿú/éÚ zUnable to split head from '%s') rrrrÚreadlineÚcloseÚ ExceptionrÚreplaceÚsplitÚrstrip) ÚheadfileÚremoterÚ fail_on_errorÚresZrawdataÚfZrefpartsZnewrefZ nrefpartsrrr Ú head_splitterms*       r5c Cs0|dur dStj tj tj tj |¡¡¡¡S)N)rrÚnormpathÚrealpathÚ expanduserÚ expandvars©rrrr Úunfrackgitpathˆsr;c Cs¤g}d|}|j||d\}}}| d¡}d} |D]} d| vr2| } q2| r |  dd¡} |  dd¡} |  dd ¡} t | ¡} | D]$} |  d ¡rz|  d d¡} | | ¡qz|S) Nz%s submodule update --help©Úcwdr)zgit submodule [--quiet] update ú[r#ú]ú|r%z--)Ú run_commandr.r-ÚshlexÚ startswithÚappend) rÚgit_pathr=ÚparamsÚcmdÚrcÚstdoutÚstderrÚlinesZ update_lineÚlineÚpartsÚpartrrr Úget_submodule_update_paramss$        rOc Csöz|jd|||di}d} | ¡D]b} |  d¡rj| d d …} qNt|  ¡ƒd krœ| durŠ| ¡|  ¡|| <d} qN|jd |  ¡d qN| durÊ|jd| d |S)NÚ submoduleÚforeachz rev-parser<rz(Unable to determine hashes of submodules©rrIrJrHz Entering 'é r&é(z'Unable to parse submodule hash line: %sr z%Unable to find hash for submodule: %s)rArÚ splitlinesrCÚlenÚstrip) rErrmÚversionrGrHÚoutrZ submodulesZ subm_namerLrrr Úget_submodule_versionss.ü   r~cCsDtj |¡}zt |¡Wnty,Yn0|dg}|rF| d¡n| d|g¡t|||||ƒprt|||||ƒ}|rÈ|dks„| r˜| dt |ƒg¡n0|r¾| dt |ƒg¡| d|g¡n |  d¡|rÞ| dt |ƒg¡|r8| d urü|j d |d | t d ƒkr|  d | ¡n| d¡|r8| d|g¡d}| r~| d ur\|j d |d | t dƒkrpd}n| d| ¡| ||g¡|j |d|d|r¼t|| | tj |d¡|ƒ|ræ|dkræ|j |dd||gd|d| r*|dg}|r | dt |ƒg¡| || g¡|j |d|d| r@t|||||ƒd S)z3 makes a new git repo if it does not already exist Úclonez--barez--originrkú--depthz--branchzsIgnoring depth argument. Shallow clones are only available for HEAD, branches, tags or in combination with refspec.z --referenceNz Cannot find git executable at %sr z1.7.10z=git version '%s' is too old to use 'single-branch'. Ignoring.z--single-branchFz1.7.5Tz--separate-git-dir=%s©Zcheck_rcr=rÚoriginr1ÚaddÚfetch)rrÚdirnameÚmakedirsr,rDÚextendÚis_remote_branchÚ is_remote_tagÚstrÚwarnrrrAr!rÚverify_commit_sign)rErÚrepormr1Údepthr|ÚbareÚ referenceÚrefspecÚgit_version_usedÚ verify_commitÚseparate_git_dirrÚ gpg_whitelistÚ single_branchZ dest_dirnamerGZis_branch_or_tagZneeds_separate_git_dir_fallbackrrr r9s`        rc CsJ|rdSd|}|j||d\}}}| ¡}ttdd„|ƒƒ}t|ƒdkS)NFz%s status --porcelainr<cSst d|¡ S)Nz^\?\?.*$)ÚreÚsearch)Úcrrr Ú‡óz has_local_mods..r)rAryÚlistÚfilterrz) rrErmrrGrHrIrJrKrrr Úhas_local_mods€sržcCsd|f}|j|d|dS)z… Resets the index and working tree to HEAD. Discards any changes to tracked files in working tree since that commit. z%s reset --hard HEADTr)rA)rErrmrGrrr ÚresetŒs rŸc  Cs¸|durdd|iS||kr´t||ƒ} t||||||||d| ƒ d|||f} |j| |d\} } } | dkrv| rvd| iS| dkrŽdd||fiS| r¤dd ||| fiSdd ||fiSiS) z* Return the difference between 2 versions NZpreparedz>> Newly checked out %sr#z %s diff %s %sr<rz*>> No visual differences between %s and %sz5>> Failed to get proper diff between %s and %s: >> %sz.>> Failed to get proper diff between %s and %s)rhr„rA)rrErmrr1rŽrÚbeforeÚafterr’rGrHr}rrrr Úget_diff–s   r¢cCsZd}d}d}||jdkr d}n$|dtj |jd¡kr@d}n|}|dkr~|r^d||f} qÆt|||||ƒ} d||| f} nHt|||||ƒržd|||f} n(t|||||ƒrÂd}d|||f} n|S|j| d|d \} } } t| ƒd krþ|j d || | | d t | ƒ} |rJ|   d ¡D]2}|  |d¡r6|} qJn|  |¡r|} q|   ¡d}|S)NFrTúfile://rkz%s ls-remote %s -h HEADú %s ls-remote %s -h refs/heads/%sz %s ls-remote %s -t refs/tags/%s*rr$z*Could not determine remote revision for %srvr)z^{}r) rFrrr8Úget_head_branchrˆr‰rArzrrr.Úendswith)rErrmr|r1rZcloningr=ÚtagrGZ head_branchrHr}rZrevrrr Úget_remote_head«s@   r¨c Cs@d|||f}|j|d|d\}}}t|dd|vr8dSdSdS)Nz%s ls-remote %s -t refs/tags/%sTrÚsurrogate_or_strict©ÚerrorsF©rAr© rErrmr1r|rGrHr}rrrr r‰Øs r‰c Cshg}d|f}|j||d\}}}|dkr>|jd|||d| d¡D]}| ¡rH| | ¡¡qH|S)Nz%s branch --no-color -ar<rz-Could not determine branch data - received %s©rrIrJr))rArr.r{rD) rErrmÚbranchesrGrHr}rrLrrr Ú get_branchesás r°c Cs†g}|ddddg}|j||d\}}}|dkrB|jd|||dt|ƒ d ¡D]0}| ¡rP| ¡ d ¡\} } | d krP| | ¡qP|S) Nz for-each-refz refs/tags/ú--formatz%(objecttype):%(refname:short)r<rz*Could not determine tag data - received %sr®r)ú:r§)rArrr.r{rD) rErrmÚtagsrGrHr}rrLZtagtypeZtagnamerrr Úget_annotated_tagsís r´c Cs@d|||f}|j|d|d\}}}t|dd|vr8dSdSdS)Nr¤Trr©rªFr¬r­rrr rˆûs rˆcCs8t|||ƒ}d|}||vr dSd||vr0dSdSdS)Nz%sTz* %sF)r°)rErrmÚbranchr¯Zlbranchrrr Úis_local_branchs  r¶cCsBt|||ƒ}|D],}| d¡rd|vs6d|vs6d|vrdSqdS)Nz* z no branchz detached fromz detached atTF)r°rC)rErrmr¯rµrrr Úis_not_a_branchs  "r·cCs²|r |}ntj |d¡}tj |¡r®t|dƒ}| ¡}Wdƒn1sL0Y| ¡ dd¡\}}|rvtdƒ‚tj  |¡rˆ|}ntj ||¡}tj  |¡s®td|ƒ‚|S)Nrr"zgitdir: r$z..git file has invalid git dir reference formatz%s is not a directory) rrrÚisfilerÚreadr/r.rrÚisabsÚisdir)rmrÚ repo_pathZgitfileÚdataZ ref_prefixZgitdirrrr Ú get_repo_paths  &   r¾c CsŒzt||ƒ}Wn:ttfyH}z|jdt|ƒdWYd}~n d}~00tj |d¡}t|||ƒrxtj |dd|d¡}t |||dd}|S) aN Determine what branch HEAD is associated with. This is partly taken from lib/ansible/utils/__init__.py. It finds the correct path to .git/HEAD and reads from that file the branch that HEAD is associated with. In the case of a detached HEAD, this will look up the branch in .git/refs/remotes//HEAD. úcCurrent repo does not have a valid reference to a separate Git dir or it refers to the invalid pathrpNrkZrefsZremotesT)rr2) r¾rrrrrrrrr·r5) rErrmr1rr¼rr0rµrrr r¥0sý r¥cCs:|dd|g}|j||d\}}}|dkr,dSt|ƒ d¡S)z%Return URL of remote source for repo.z ls-remotez --get-urlr<rNr)rl)rErrmr1ÚcommandrHr}rrrr Úget_remote_urlLs  rÁc Cs~t||||ƒ}||ks&t|ƒt|ƒkr*dS|dd||g}|j||d\}}} |dkrvd||f} |jd| || fd|d uS) ú" updates repo from remote sources Fr1zset-urlr<rzset a new url %s for %súFailed to %s: %s %sr N)rÁr;rAr) rErrrmr1Ú remote_urlrÀrHr}rÚlabelrrr Úset_remote_urlWs rÆc Csªt|||||ƒg} d} |dg} g}|rÖt||||ƒ}|rF| |¡nz|dkrZ| |¡nft|||||ƒrš||kr„| d||f¡| d|||f¡n&t|||||ƒrÀ| d|d|¡|rÖ|  dt|ƒg¡|rà|s2|rîd d g}n4| td ƒkr|  d ¡n|  | | |gf¡d g}|r2| |¡| rB|  d ¡|  |g¡|  | | |f¡| D]@\}}|j||d\}}}|dkrd|j d|||f|dqddS)rÂz download remote objects and refsr„rkú+refs/heads/%s:refs/heads/%sz!+refs/heads/%s:refs/remotes/%s/%sz +refs/tags/z :refs/tags/r€z+refs/heads/*:refs/heads/*z+refs/tags/*:refs/tags/*z1.9z--tagsú--forcer<rrÃ)rrGN) rÆr¥rDrˆr‰r‡rŠrrAr)rErrrmr|r1rŽrr‘r’ÚforceZcommandsZ fetch_strZ fetch_cmdZrefspecsZ currentheadrÅrÀrHr}rrrr r„isH          r„cCsfd}tj tj |d¡¡s|Sttj |d¡dƒ}|D]F}|s6| ¡ d¡r6| dd¡d ¡}tj tj ||d¡¡s6d}q6|sbt|||ƒ} |d d |d g} |j | d|d \} } } | d krÐ|j d| | d|rüd}t|||d||fƒ}| |krúd}nf|d dg} |j | d|d \} } } | d kr:|j d| | d|   ¡D]}|d dkrBd}qbqB|S)NFú .gitmodulesr"rú=r$rTrtrur„rrzFailed to fetch submodules: %sr Zmasterz%s/%sÚstatusz'Failed to retrieve submodule status: %sr%) rrrrrr{rCr.r~rArry)rErr1Útrack_submodulesrmÚchangedZgitmodules_filerLrZbeginrGrHr}rr|r¡rrr Úsubmodules_fetch§s:     rÏc Csºt|||ƒ}tj tj |d¡¡s&dS|ddg}|j|d|d\}}} d|vrd|rd|ddd d d g}n|ddd d g}|r€| d ¡|j||d \}}} |dkr°|jd|| d||| fS)z init and update any submodules rÊ)rr#r#rtÚsyncTrr1Úupdatez--initz --recursivez--remoterÈr<rz$Failed to init/update submodules: %sr )rOrrrrrArDr) rErrmrÍrÉrFrGrHr}rrrr Úsubmodule_updateÔs    rÒc Csdd||f}|d|||f7}d||||f}|j||d\}} } |dkr`|jd|| | |ddS) zßset refs for the remote branch version This assumes the branch does not yet exist locally and is therefore also not checked out. Can't use git remote set-branches, as it is not available in git 1.7.1 (centos6) rÇz" +refs/heads/%s:refs/remotes/%s/%sz%s fetch --depth=%s %s %sr<rz&Failed to fetch branch from remote: %srvN)rAr) rErrmr1r|rŽZ branchrefrGrHr}rrrr Úset_remote_branchës  rÓcCsŠd}|dkrdt||||ƒ} |jd|| f|d\} } } | dkrT|jd| | | | dd||| f}n¬t|||||ƒr|ršt||||ƒsšt||||||ƒt||||ƒsºd ||||f}nH|jd||f|d\} } } | dkrô|jd|| | | dd |||f}n d||f}|j||d\} } }| dkrj|dkrR|jd || || |d n|jd| | || |d |r€t|||||ƒ| | |fS) Nr#rkz%s checkout --force %sr<rzFailed to checkout branch %srvz%s reset --hard %s/%s --z%s checkout --track -b %s %s/%sz%s reset --hard %s/%szFailed to checkout %s)rrIrJrHrG)r¥rArrˆr¶rÓrŒ)rErrmr1r|r“rŽr•rGrµrHr}rZout1Zerr1rrr Úswitch_versionús> ÿ    ÿ ÿrÔc Csš|t|||ƒvrd}nd}d|||f}|r4|d7}|j||d\}}} |dkrf|jd||| |d|rt| ƒ} | |vr|jd | || |d||| fS) Nz verify-tagz verify-commitz%s %s %sz --rawr<rz1Failed to verify GPG signature of commit/tag "%s"rvzFThe gpg_whitelist does not include the public key "%s" for this commit)r´rArÚget_gpg_fingerprint) rErrmr|r•Zgit_subrGrHr}rZ fingerprintrrr rŒ#srŒcCsF| ¡D]8}| ¡}|ddkr"qt|ƒdkr2dnd}||SdS)z’Return a fingerprint of the primary key. Ref: https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=doc/DETAILS;hb=HEAD#l482 r$ZVALIDSIGé r(N)ryr.rz)ÚoutputrLr½Zdata_idrrr rÕ5s   rÕcCsLd|}| |¡\}}}|dkr$dSt dt|ƒ¡}|stj |¡}t|ƒ}t||||d?|_|r8tj |¡}d}|sV| rV|j d@d8n®|rtj |¡}zPt|| ƒ}|r¶tj |¡r¶||kr¶d|dA<|js¶t|||||ƒ|}Wn<ttfyô}z|j dBt |ƒd<WYd}~n d}~00tj |dC¡}t||ƒ}t ||||ƒ|durB|t!dDƒkrB| dE¡d}|jdF}|jdG}|j"ddHd}|rztj |¡r†|s$| s$|js”| sút#|||||| ƒ}|j"d|dI|j$rêt%||||||| |dJ|dKƒ } | rê| |dL<|j&fi|¤Žt'|||||||| | ||| ||| |ƒnæ|sžt(|||ƒ|dJ<|j"|dJdM|rŠ|jrt|j"ddN|j&fi|¤Žt)||||||||ƒ|j&fi|¤Žnlt*|||| ƒ}t(|||ƒ|dJ<|r |sä|j fdOdP|dQi|¤Ž|js t+|||ƒ|j"ddP|dR|jrBt,||||ƒ}!|!o>|!|ko>t-|!ƒt-|ƒk}"nt.|||||ƒ}"|j"|"dS|jrÜt#|||||| ƒ}|j"|dJ|kpŒ|"|dI|j$rÊt%||||||| |dJ|dKƒ } | rÊ| |dL<|j&fi|¤Žnt/|||||||| |||dT t(|||ƒ|dK<| s&t0|||||| || ƒd}#|r| st1|||||ƒ}#|#r|j"|#dU|jr~|j"d|dI|j&fi|¤Žt2|||||dTt(|||ƒ|dK<|dJ|dKksÄ|sÄ|#sÄ|"r|j"ddN|j$rt%||||||| |dJ|dKƒ } | r| |dL<|rF|jr0|j"ddN|j&fi|¤Žt)||||||||ƒ|j&fi|¤ŽdS)VNr)ÚtypeTÚname)ÚrequiredÚaliasesrk)Údefaultr‚ÚnoÚbool)ríréÚintZyesrœrŠ)ríréÚelementsF)rírérë)rírëÚraw)rmrr|r1r‘rrÉrŽrrÑr“r•reÚaccept_newhostkeyrfrgÚ executablerÚ recursiver–rÍÚumaskrÙrÜr”)r”r)rerórÜrÙ)Z argument_specZmutually_exclusiveZ required_byZsupports_check_modermrr|r1r‘rÉrŽrÑrrr“r•rr–rôÚgitrfrgrör”)rÎÚwarningsrez-o StrictHostKeyChecking=noz#-o StrictHostKeyChecking=accept-newz -o StrictHostKeyChecking=norózWYour ssh client does not support accept_newhostkey option, therefore it cannot be used.z$ -o StrictHostKeyChecking=accept-newz/umask must be defined as a quoted octal integerr ézumask must be an octal integerr$rpr'r£)ÚLANGÚLC_ALLÚ LC_MESSAGESÚLC_CTYPEz;the destination directory must be specified unless clone=norÎr¿Zconfigz1.9.1z[git version is too old to fully support the depth argument. Falling back to full checkouts.rõrÍ)r )rÎr¡r r¡Údiff)r¡rárz.Local modifications exist in the destination: z (force=no).)rÎr)Úremote_url_changed)rÉ)Zsubmodules_changed)3rÚdictrFr rœrsr‹Ú isinstancer rrðr,rÚsysÚexc_inforrörr8rCr Zrun_command_environ_updater7Úabspathr¾rZ check_moder!rrrrrhrjrrÑr¨Z_diffr¢Z exit_jsonrrorèržrŸrÁr;rÆr„rÔrÏrÒ)$rrmrr|r1r‘rÉrŽrÑZ allow_clonerr“r•rr–rErfrgrörÙrÜr”rÚlocaleZ gitconfigr¼rr’rõrÍZ local_modsZ remote_headrþrÄrÿZsubmodules_updatedrrr Úmain”sb                 çâ!                               ÿ      ý       ÿ  "    $   rÚ__main__)NF)rk)rk)F)F)F)CZ __future__rrrréZ __metaclass__Z DOCUMENTATIONZEXAMPLESZRETURNrãrr—rBr\rrrXZ#ansible.module_utils.compat.versionrZansible.module_utils._textrrZansible.module_utils.basicrZ"ansible.module_utils.common.localer Z#ansible.module_utils.common.processr Zansible.module_utils.sixr r r!r5r;rOrdrjrorsr~rržrŸr¢r¨r‰r°r´rˆr¶r·r¾r¥rÁrÆr„rÏrÒrÓrÔrŒrÕrhrÝrèrÚ__name__rrrr Úsre;!     %5  G  -       >- )2v