Tuesday 26 April 2022

Git checkouts using ansible.builtin.git module: example


cat git.yml 

---

 - name: git module demo

   hosts: all

   become: yes

   tasks: 

     - name: ensure git pkg installed

       ansible.builtin.apt:

         name: git

         state: present

     - name: checkout git repo

       ansible.builtin.git:

         repo: https://<URL> 

         dest: /Path/to/Dir 


ansible-playbook git.yml


ansible.builtin.git module

No comments:

Post a Comment