27 lines
860 B
YAML
27 lines
860 B
YAML
---
|
|
- name: Install VSCode
|
|
ansible.builtin.include_tasks: "install_{{ ansible_facts.pkg_mgr }}.yml"
|
|
tags: install
|
|
|
|
- name: Create directories for VSCode
|
|
ansible.builtin.file:
|
|
path: "$HOME/.config/Code - Insiders/User"
|
|
state: directory
|
|
mode: 0740
|
|
|
|
- name: Install VSCode configuration
|
|
ansible.builtin.copy:
|
|
src: files/{{ item }}.json
|
|
dest: "~/.config/Code - Insiders/User/{{ item }}.json"
|
|
mode: 0640
|
|
loop:
|
|
- settings
|
|
- keybindings
|
|
|
|
- name: Install extensions
|
|
ansible.builtin.command:
|
|
cmd: code-insiders --install-extension {{ item }}
|
|
register: _editor_vscode_installation_result
|
|
changed_when: '"was successfully installed." in _editor_vscode_installation_result.stdout'
|
|
failed_when: '"Error while installing extensions" in _editor_vscode_installation_result.stderr'
|
|
loop: "{{ editor_vscode_extensions }}"
|