dotfiles/roles/projects/tasks/main.yaml

23 lines
660 B
YAML

---
- name: Create project directories
ansible.builtin.file:
path: "{{ project_directory_item }}"
state: directory
recurse: yes
loop_control:
loop_var: project_directory_item
with_items: "{{ project_directories | default([]) }}"
- name: Clone projects
ansible.builtin.git:
accept_hostkey: yes
bare: "{{ project_item.bare | default(true) }}"
clone: yes
dest: "{{ ansible_user_dir }}/Code/{{ project_item.dest }}"
repo: "{{ project_item.repo }}"
version: "{{ project_item.version | default('main') }}"
update: no
loop_control:
loop_var: project_item
with_items: "{{ project_projects | default([]) }}"