linroom: fix VS code extension permissions
And clean up the installation script a bit.
This commit is contained in:
parent
66079fbd17
commit
bf940a2956
4
roles/linroom/handlers/main.yml
Normal file
4
roles/linroom/handlers/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Mark everything in bin/ directories executable. Some extensions do
|
||||
# this on activation, but non-root users don’t have permission for it.
|
||||
- name: fix VS code extensions
|
||||
command: find /usr/share/code/resources/app -name bin -exec chmod -R +x '{}' ';'
|
|
@ -1,21 +1,19 @@
|
|||
- name: Add VS repository
|
||||
block:
|
||||
- name: VS repo - apt key
|
||||
ansible.builtin.get_url:
|
||||
url: https://packages.microsoft.com/keys/microsoft.asc
|
||||
dest: /etc/apt/trusted.gpg.d/microsoft_key.asc
|
||||
- name: VS repo - url
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "deb https://packages.microsoft.com/repos/vscode stable main"
|
||||
state: present
|
||||
- name: Add VS repo key
|
||||
apt_key:
|
||||
url: https://packages.microsoft.com/keys/microsoft.asc
|
||||
keyring: /etc/apt/trusted.gpg.d/microsoft.gpg
|
||||
|
||||
- name: Add VS repo url
|
||||
apt_repository:
|
||||
repo: "deb https://packages.microsoft.com/repos/vscode stable main"
|
||||
|
||||
- name: Install VSCode
|
||||
ansible.builtin.apt:
|
||||
apt:
|
||||
name: code
|
||||
state: latest
|
||||
|
||||
- name: Install VS Code extensions
|
||||
shell: code --no-sandbox --user-data-dir "/usr/share/code/resources/app" --extensions-dir "/usr/share/code/resources/app/extensions" --install-extension "{{ item }}"
|
||||
command: code --no-sandbox --user-data-dir "/usr/share/code/resources/app" --extensions-dir "/usr/share/code/resources/app/extensions" --install-extension "{{ item }}"
|
||||
loop:
|
||||
- VisualStudioExptTeam.vscodeintellicode
|
||||
- arthurwang.vsc-prolog
|
||||
|
@ -33,3 +31,4 @@
|
|||
- marus25.cortex-debug # RA-63703
|
||||
- NateAGeek.memory-viewer # RA-63703
|
||||
- ms-vscode.cpptools-extension-pack # RA-63703
|
||||
notify: fix VS code extensions
|
||||
|
|
Loading…
Reference in a new issue