Ansible이 Azure Repositories에서 git 리포지토리를 복제하도록하려면 어떤 특정 구문을 사용해야합니까?
저장소 URL은 https://[email protected]/OrganizationName/ProjectName/_git/RepositoryName
다음과 같이 요청 된 비밀번호를 제공하여 대화식 쉘에서 수동으로 복제 할 수 있습니다.
$ git clone https://[email protected]/OrganizationName/ProjectName/_git/RepositoryName
Password for 'https://[email protected]':
그러나 공식 Ansible 문서에서 가져온 Ansible 예제 작업에는 다음과 같이 암호에 대한 언급이 포함되어 있지 않습니다.
- name: Clone a repo
git:
repo: https://[email protected]/OrganizationName/ProjectName/_git/RepositoryName
dest: /src/RepositoryName
비밀번호는 아래와 같이 저장소 링크에 있어야합니다.
---
- name: Clone repo playbook
hosts: dev
vars_prompt:
- name: "git_user"
prompt: "Enter your git username"
private: no
- name: "git_password"
prompt: "Password for 'https://[email protected]'"
private: yes
tasks:
- name: Clone a repo
git:
repo: https://{{ git_user | urlencode }}:{{ git_password | urlencode }}@dev.azure.com/OrganizationName/ProjectName/_git/RepositoryName
dest: /src/RepositoryName
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다