Skip to content

Install and configure VSCODE, allowing you to start coding faster and more efficiently.

License

Notifications You must be signed in to change notification settings

marcusburghardt/ansible-role-vscode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-role-vscode

This role will ensure the Visual Studio Code is properly installed and configured.
We can manage extensions and workspaces through variables, using the existing
standards defined in "defaults/main.yml" or overridden them in a playbook, for example.

This role will:

  • Ensure the Official Repository for VSCode;
  • Ensure VSCode is installed and updated from official repository;
  • Ensure the desired state for the defined extensions;
  • Ensure the desired Worspaces are configured;
  • Ensure the desired User Settings are set;

To install this role:
$ ansible-galaxy role install marcusburghardt.vscode

Requirements

  • python3

Role Variables

You can customize your environment in a very simple and centralized way editing some variables in:

  • defaults/main.yml

In some rare cases, you may change some configuration to reflect your local environment in:

  • vars/*.yml

Observe that the above variables could be set in your playbook too, which, IMO is much more elegant. ;)
Take a look in the Example Playbook section.

Dependencies

None

Example Playbook

This playbook will prepare everything with the right variables.
For this example, lets call this playbook file as "ansible_vscode.yml":


  • hosts: linux vars:
    • vscode_tasks:
      • { enabled: true, name: 'install_vscode' } # Requires -K option
      • { enabled: true, name: 'configure_extensions' }
      • { enabled: true, name: 'configure_workspaces' }
      • { enabled: true, name: 'configure_user_settings' } roles:
    • marcusburghardt.vscode

Considering the inventory file is in the same folder and is called "hosts_vscode",
you can run this command to see the magic happen:
$ ansible-playbook -K -i hosts_vscode ansible_vscode.yml

Maybe you would like to set some ansible configurations for this environment.
For instance, define a local folder to hold downloads roles.
You can find an example of ansible.cfg file in "files" folder.

License

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

Author Information

Marcus Burghardt

About

Install and configure VSCODE, allowing you to start coding faster and more efficiently.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages