Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
143 lines (99 sloc) 3.56 KB

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.