feat(role): add projects
This commit is contained in:
parent
7f06e49aea
commit
5aa64705ea
3
roles/projects/meta/main.yaml
Normal file
3
roles/projects/meta/main.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: ssh
|
20
roles/projects/tasks/main.yaml
Normal file
20
roles/projects/tasks/main.yaml
Normal 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([]) }}"
|
Loading…
Reference in a new issue