dotfiles/roles/editors/vscode/tasks/main.yml

43 lines
987 B
YAML
Raw Permalink Normal View History

---
- name: Create directories for VSCode
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: 0740
loop:
- ~/.local/bin
- ~/.local/share
- "$HOME/.config/Code - Insiders/User"
- name: Install VSCode script
ansible.builtin.copy:
src: files/update.sh
dest: ~/.local/bin/code-update.sh
mode: 0640
- name: Create app info for VSCode
ansible.builtin.copy:
src: files/code{{ item }}.desktop
dest: ~/.local/share/applications/visual-studio-code-insiders{{ item }}.desktop
mode: 0640
loop:
- ""
- "-url-handler"
- 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 VSCode
ansible.builtin.command:
cmd: bash /home/{{ target_user }}/.local/bin/code-update.sh
creates: /opt/VSCode-linux-x64
become: true
when: false
tags: install