dotfiles/roles/projects/tasks/main.yaml

23 lines
660 B
YAML
Raw Normal View History

2022-08-02 04:15:17 +00:00
---
- 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) }}"
2022-08-02 04:15:17 +00:00
clone: yes
dest: "{{ ansible_user_dir }}/Code/{{ project_item.dest }}"
repo: "{{ project_item.repo }}"
version: "{{ project_item.version | default('main') }}"
2022-08-02 04:15:17 +00:00
update: no
loop_control:
loop_var: project_item
with_items: "{{ project_projects | default([]) }}"