Interactive password support for Ansible clone of Azure Repository

Your password must be in your repo link as below

- name: Clone repo playbook
  hosts: dev

    - name: "git_user" 
      prompt: "Enter your git username" 
      private: no
    - name: "git_password" 
      prompt: "Password for 'https://[email protected]'"
      private: yes 

  - name: Clone a repo 
      repo: https://{{ git_user | urlencode }}:{{ git_password | urlencode }}
      dest: /src/RepositoryName

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top