Skip to content
Ansible role for installing Visual Studio Code extensions
Shell Python
Branch: master
Clone or download
freemanjp Increased minimum Ansible version to 2.6 (#70)
Ansible no longer supports versions earlier than 2.6.
Latest commit 570a4ab Jul 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.moleculew
defaults
handlers
library Added support for VS Code Insiders builds (#67) Jun 15, 2019
meta Increased minimum Ansible version to 2.6 (#70) Jul 21, 2019
molecule
tasks Added support for VS Code Insiders builds (#67) Jun 15, 2019
vars Added support for VS Code Insiders builds (#67) Jun 15, 2019
.editorconfig Added .editorconfig file Nov 4, 2016
.gitattributes Added .gitattributes Nov 4, 2016
.gitignore Added feature to uninstall an extension (#23) Jul 22, 2017
.travis.yml Increased minimum Ansible version to 2.6 (#70) Jul 21, 2019
.yamllint Updated Molecule to 2.20.1 (#62) May 18, 2019
LICENSE Initial commit Nov 4, 2016
README.md Increased minimum Ansible version to 2.6 (#70) Jul 21, 2019
moleculew Updated moleculew to version 0.9.9 (#54) Sep 16, 2018

README.md

Ansible Role: Visual Studio Code Extensions

Build Status Ansible Galaxy License

Role to install extensions for the Visual Studio Code IDE / text editor.

Requirements

  • Ansible >= 2.6

  • OS

    • Linux

      • Debian Family

        • Ubuntu

          • Xenial (16.04)
          • Bionic (18.04)
      • RedHat Family

        • CentOS

          • 7
        • Fedora

          • 28
      • SUSE Family

        • openSUSE

          • 15.1
      • Note: other versions are likely to work but have not been tested.

    • macOS

      • Consider macOS support experimental as this time as it's not included in the automated tests.

Role Variables

The following variables will change the behavior of this role (default values are shown below):

# The VS Code build (either 'stable' or 'insiders') https://code.visualstudio.com/insiders/
visual_studio_code_extensions_build: stable

# Users to install extensions for
users: []

Users are configured as follows:

users:
  - username: # Unix user name
    # Extensions to be installed if not already present
    visual_studio_code_extensions:
      - # extension 1
      - # extension 2
    # Extensions to be uninstalled if not already absent
    visual_studio_code_extensions_absent:
      - # extension 3

Example Playbook

- hosts: servers
  roles:
    - role: gantsign.visual-studio-code-extensions
      users:
        - username: vagrant
          visual_studio_code_extensions:
            - streetsidesoftware.code-spell-checker
            - wholroyd.jinja
            - ms-python.python
          visual_studio_code_extensions_absent:
            - seanmcbreen.Spell

More Roles From GantSign

You can find more roles from GantSign on Ansible Galaxy.

Development & Testing

This project uses Molecule to aid in the development and testing; the role is unit tested using Testinfra and pytest.

To develop or test you'll need to have installed the following:

Because the above can be tricky to install, this project includes Molecule Wrapper. Molecule Wrapper is a shell script that installs Molecule and it's dependencies (apart from Linux) and then executes Molecule with the command you pass it.

To test this role using Molecule Wrapper run the following command from the project root:

./moleculew test

Note: some of the dependencies need sudo permission to install.

License

MIT

Author Information

John Freeman

GantSign Ltd. Company No. 06109112 (registered in England)

You can’t perform that action at this time.