playbooks: added playbook to clone a repository

the repository url shall be prompted to keep it more flexible.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
This commit is contained in:
Marc Mattmüller 2023-05-22 10:38:11 +02:00
parent ae29034593
commit 850396ebc3
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
- name: Clone a Git Repository
hosts: linux
gather_facts: no
- name: git_url
prompt: Enter the git cloning URL, e.g. ssh://git@bitbucket.gad.local:7999/nm-nsp/nwl-ci.git
private: no
tasks:
- name: Clone a develop branch
ansible.builtin.git:
repo: "{{ git_url }}"
dest: /home/user
single_branch: yes
version: develop