Skip to content

Commit b2a5fd4

Browse files
committed
switch to direct .deb package installation of vscode
1 parent 130f15e commit b2a5fd4

2 files changed

Lines changed: 4 additions & 21 deletions

File tree

roles/vscode/tasks/main.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
---
22

3-
- name: Add VSCode apt signing key if not present
4-
apt_key:
5-
id: BC528686B50D79E339D3721CEB3E94ADBE1229CF
6-
url: https://packages.microsoft.com/keys/microsoft.asc
7-
state: present
8-
9-
- name: Add Microsoft's VSCode repository into sources list
10-
apt_repository:
11-
repo: deb [arch=amd64] https://packages.microsoft.com/repos/code stable main
12-
state: present
13-
14-
- name: Install VSCode
3+
- name: Install VSCode version 1.57.1 from .deb package
154
apt:
16-
name: code
5+
deb: https://update.code.visualstudio.com/1.57.1/linux-deb-x64/stable
176
state: present
187

198
- name: List VSCode Extensions

spec/test_vscode.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
import pytest
22

3-
def test_vscode_apt_sources_list_exists_(host):
4-
assert host.file('/etc/apt/sources.list.d/packages_microsoft_com_repos_code.list').exists
5-
6-
def test_vscode_apt_key_defined_(host):
7-
assert 'Microsoft (Release signing) <gpgsecurity@microsoft.com>' in host.run('apt-key list').stdout
8-
93
def test_vscode_command_is_found_(host):
104
assert host.run('which code').rc is 0
115

12-
def test_vscode_version_command_succeeds_(host):
13-
assert host.run('code --version').rc is 0
6+
def test_vscode_version_command_reports_version_1_57_1_(host):
7+
assert '1.57.1' in host.run('code --version').stdout
148

159
@pytest.mark.parametrize('extension', [
1610
'zbr.vscode-ansible'

0 commit comments

Comments
 (0)