feat(role): add projects

This commit is contained in:
Oliver Davies 2022-08-02 00:15:17 -04:00
parent 7f06e49aea
commit 5aa64705ea
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,3 @@
---
dependencies:
- role: ssh

View file

@ -0,0 +1,20 @@
---
- 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
clone: yes
dest: "{{ ansible_user_dir }}/Code/{{ project_item.dest }}"
repo: "{{ project_item.repo }}"
update: no
loop_control:
loop_var: project_item
with_items: "{{ project_projects | default([]) }}"