vscode
Version information
This version is compatible with:
- Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet 4.x
Start using this module
Add this module to your Puppetfile:
mod 'tragiccode-vscode', '0.1.2'
Learn more about managing modules with a PuppetfileDocumentation
vscode
Table of Contents
- Description
- Setup - The basics of getting started with vscode
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
The vscode module installs and manages microsoft's visualstudio code along with extensions Windows systems.
visualstudio code is an ide used by developers to write code.
Setup
Setup Requirements
The vscode module requires the following:
- Puppet Agent 4.0 or later.
- Access to the internet.
- Windows Server 8 and up.
Beginning with vscode
To get started with the vscode module simply include the following in your manifest:
class { 'vscode':
package_ensure => 'present',
}
This example downloads and installs vscode version 1.12.2. After running this you be have visual studio code installed and ready to go.
A more advanced configuration including all attributes available:
class { 'vscode':
package_ensure => 'present',
vscode_download_url => 'https://company-name.s3.amazonaws.com/binaries/vscode-latest.exe',
vscode_download_absolute_path => 'C:\\Windows\\Temp',
create_desktop_icon => true,
create_quick_launch_icon => true,
create_context_menu_files => true,
create_context_menu_folders => true,
add_to_path => true,
}
The above is just an example of the flexibility you have with this module. You will generally never need to specify every or even so many parameters as shown since the defaults for installation apply almost every feature available during install time. The one parameter you might use is the vscode_download_url. This will allow you to another http url to download vscode from that is not pinned to version 1.12.2 like this module from microsoft's visualstudio code download page.
Usage
Install vscode an extension
Lets look at an example of installing visual studio code along with installing a plugin to help you with puppet development
class { 'vscode':
package_ensure => 'present',
}
vscode::extension { 'Borke.puppet':
ensure => 'present',
require => Class['vscode'],
}
Uninstall a vscode extension
class { 'vscode':
package_ensure => 'present',
}
vscode::extension { 'Borke.puppet':
ensure => 'absent',
require => Class['vscode'],
}
Reference
Classes
Parameters are optional unless otherwise noted.
vscode
Installs and configures visual studio code based on user preferences/settings.
package_ensure
Specifies whether the visualstudiocode package resource should be present. Valid options: 'present', 'installed' and 'absent'.
Default: 'present'.
vscode_download_url
http/https url in which a visualstudiocode installer can be downloaded.
vscode_download_absolute_path
The location in which to store the downloaded vscode installer at on the filesystem.
Default: 'C:\Temp\VSCodeSetup-1.12.2.exe'
create_desktop_icon
Specifies whether to create an icon/shortcut for visualstudiocode on the user's desktop.
Default: true.
create_quick_launch_icon
Specifies whether to add visualstudiocode on the user's quicklaunch section of their taskbar.
Default: true.
create_context_menu_files
Specifies whether to add the open in code context menu item when a user right clicks a file.
Default: true.
create_context_menu_folders
Specifies whether to add the open in code context menu item when a user right clicks a folder.
Default: true.
add_to_path
Specifies whether to add the bin directory of visualstudio code to the user's system path.
Default: true.
Defined Types
Parameters are optional unless otherwise noted.
vscode::extension
Installs visual studio code extensions published by the community.
ensure
Specifies whether the visualstudiocode extension should be present. Valid options: 'present', 'installed' and 'absent'.
Default: 'present'.
extension_name
Specifies a visualstudiocode extension to manage. Valid options: a string containing the name of an existing visualstudiocode extension.
Default: the title of your declared resource.
Limitations
This module is only available for Windows 8 and up and works with Puppet 4.0 and later.
Development
Contributing
- Fork it ( https://github.com/tragiccode/tragiccode-vscode/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
2017-06-08 - Version 0.1.1
Summary
Minor bug fixes with no breaking changes.
Bug Fixes
- Fixed broken rspec puppet tests
- Fixed metadata.json to include o/s support to prevent getting dinged on the forge's automated module quality analysis
2017-06-06 - Version 0.1.0
Summary
This is the initial release with functionality to manage visualstudiocode and extension installation.
Features
- Added
app_data
fact ( Should probably moved out to a generic module ) - Added Classes
vscode
( Main Class )vscode::install
( Private )vscode::config
( Private )vscode::params
( Private )
- Added Defined Types
vscode::extension
Dependencies
- puppetlabs-stdlib (4.x)