get-code-git.yml 259 B

12345678910111213
  1. ---
  2. # Get the latest code
  3. - name: Delete remote code directory if exists
  4. file:
  5. state: absent
  6. path: "{{ remote_code_path }}"
  7. - name: Git checkout
  8. git:
  9. repo: "{{ git_repo }}"
  10. dest: "{{ remote_code_path }}"
  11. version: "{{ branch_name }}"