get-code-git.yml 273 B

1234567891011121314
  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. become: yes
  8. - name: Git checkout
  9. git:
  10. repo: "{{ git_repo }}"
  11. dest: "{{ remote_code_path }}"
  12. version: "{{ branch_name }}"