Skip to content

Commit

Permalink
Add feature to install extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
gorschu committed Nov 8, 2017
1 parent 28bd6d3 commit 92411be
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
# defaults file for azmodude.visual-studio-code
vscode_extensions: []
11 changes: 11 additions & 0 deletions tasks/install_extensions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
- name: Install Extensions for user(s)
become: yes
become_user: "{{ item.0.name }}"
command: "code --user-data-dir=/tmp --install-extension '{{ item.1 }}'"
with_subelements:
- "{{ vscode_extensions }}"
- extensions
- skip_missing: yes
register: vscode_install_result
changed_when: "'already installed' not in vscode_install_result.stdout"
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
when: ansible_os_family == "RedHat"
- include_tasks: "suse.yml"
when: ansible_os_family == "Suse"
- include_tasks: install_extensions.yml
when: vscode_extensions is defined

0 comments on commit 92411be

Please sign in to comment.