VS Code/ Languages: make it more universial
This commit is contained in:
parent
063a927e01
commit
388f15988a
|
@ -24,8 +24,8 @@ The User Setup will change the user shell and global gitconfig. This can be disa
|
|||
|
||||
For a GUI/ Desktop machine, you can enable to install and configure VS Code:
|
||||
- `user_vscode`: Boolean to install and set the basic configuration of VS Code
|
||||
- `user_vscode_cpp`: Boolean to install C/C++ dev tools and configure VS Code
|
||||
- `user_vscode_python`: Boolean to install Python dev tools and configure VS Code
|
||||
- `user_lang_cpp`: Boolean to install C/C++ dev tools and configure VS Code
|
||||
- `user_lang_python`: Boolean to install Python dev tools and configure VS Code
|
||||
|
||||
|
||||
Dependencies
|
||||
|
|
|
@ -9,5 +9,5 @@ usersetup_gitconfig: true
|
|||
|
||||
# install VS Code and selectively activate different programming languages
|
||||
user_vscode: false
|
||||
user_vscode_cpp: false
|
||||
user_vscode_python: false
|
||||
user_lang_cpp: false
|
||||
user_lang_python: false
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
vars:
|
||||
packages:
|
||||
- clang-format
|
||||
when: user_vscode == true and user_vscode_cpp == true
|
||||
when: user_lang_cpp == true
|
||||
|
||||
|
||||
# VS Code - Python Development Tools
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
vars:
|
||||
packages:
|
||||
- clang-format
|
||||
when: user_vscode == true and user_vscode_cpp == true
|
||||
when: user_lang_cpp == true
|
||||
|
||||
|
||||
# VS Code - Python Development Tools
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
vars:
|
||||
packages:
|
||||
- clang-format
|
||||
when: user_vscode == true and user_vscode_cpp == true
|
||||
when: user_lang_cpp == true
|
||||
|
||||
|
||||
# VS Code - Python Development Tools
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
---
|
||||
# Common/VSCode: Install and Configure VS Code
|
||||
# - Installs VS Code, if user_vscode is set
|
||||
# - Installs development tools, if the corresponding variable is set
|
||||
# but will not try to configure VS Code, if user_vscode is not set.
|
||||
# - Also configures VS Code, of user_vscode is set
|
||||
|
||||
# Variables:
|
||||
# - user_vscode: Boolean, if vscode should be installed and configured
|
||||
# - user_lang_cpp: Boolean for C and C++
|
||||
# - user_lang_python: Boolean for Python
|
||||
|
||||
|
||||
- name: vscode - Install and configure VS Code
|
||||
include_tasks: "{{ item }}"
|
||||
|
@ -30,20 +40,21 @@
|
|||
shell: |
|
||||
PATH=/usr/local/bin:$PATH
|
||||
code --install-extension ms-vscode.cpptools
|
||||
when: user_vscode == true and user_vscode_cpp == true
|
||||
when: user_vscode == true and user_lang_cpp == true
|
||||
|
||||
|
||||
# VS Code - Python Development Tools
|
||||
- name: vscode - Python
|
||||
block:
|
||||
- name: vscode - Python - Install python dev packages
|
||||
pip:
|
||||
name:
|
||||
- autopep8
|
||||
- pylint
|
||||
executable: /usr/local/bin/pip3
|
||||
when: user_lang_python == true
|
||||
- name: vscode - Python
|
||||
block:
|
||||
- name: vscode - Python - Configure VS Code
|
||||
shell: |
|
||||
PATH=/usr/local/bin:$PATH
|
||||
code --install-extension ms-python.python
|
||||
when: user_vscode == true and user_vscode_python == true
|
||||
when: user_vscode == true and user_lang_python == true
|
||||
|
|
Loading…
Reference in a new issue