-
Notifications
You must be signed in to change notification settings - Fork 499
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
ansible/roles/vscode-server/tasks/clone-workspace-repos.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
- name: Create workshop/demo directories | ||
when: vscode_user_workspace_path is defined | ||
ansible.builtin.file: | ||
path: "{{ vscode_user_workspace_path }}" | ||
state: directory | ||
mode: '0755' | ||
owner: "{{ vscode_user_name }}" | ||
|
||
- name: Set repo dest path | ||
when: vscode_user_workspace_path is not defined | ||
ansible.builtin.set_fact: | ||
vscode_user_workspace_path: "/home/{{ vscode_user_name }}" | ||
|
||
- name: Clone repositories | ||
become_user: "{{ vscode_user_name }}" | ||
ansible.builtin.git: | ||
repo: "{{ _vscode_repo.repo }}" | ||
dest: "{{ vscode_user_workspace_path }}/{{ _vscode_repo.name }}" | ||
version: "{{ _vscode_repo.branch | default('main') }}" | ||
loop: "{{ vscode_user_workspace_repos }}" | ||
loop_control: | ||
loop_var: _vscode_repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters