Skip to content

Commit 88d5ab1

Browse files
committed
feat: add visual studio role extensions installation
1 parent 4ba07f9 commit 88d5ab1

File tree

5 files changed

+56
-22
lines changed

5 files changed

+56
-22
lines changed

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@ This Ansible collection provides a set of roles designed for configuring Kubuntu
66

77
### Roles
88

9-
| Role | Description | Dependencies |
10-
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ |
11-
| [xebis.ansible.apt](roles/apt/README.md) | Deb package updates and upgrades using the apt package manager. Can optionally clean up unused packages and reboot the system if required. | `xebis.ansible.system` |
12-
| `xebis.ansible.ansible` | Ansible direnv | `xebis.ansible.apt` |
13-
| [`xebis.ansible.coding_projects`](roles/coding_projects/README.md) | Creates and clones coding projects to `~/Projects` | `xebis.ansible.apt` |
14-
| `xebis.ansible.direnv` | direnv and Bash config for direnv | `xebis.ansible.apt` |
15-
| `xebis.ansible.docker` | Docker direnv | `xebis.ansible.apt`, `xebis.ansible.nftables_firewall` |
16-
| [xebis.ansible.grub](roles/grub/README.md) | GRUB menu configuration. | |
17-
| `xebis.ansible.fail2ban` | Fail2ban IPS | `xebis.ansible.apt` |
18-
| `xebis.ansible.google_chrome` | Google Chrome (Stable) | `xebis.ansible.apt` |
19-
| `xebis.ansible.kde` | KDE firewall and utilities | `xebis.ansible.apt`, `xebis.ansible.nftables_firewall` |
20-
| `xebis.ansible.mc` | Midnight Commander | `xebis.ansible.apt` |
21-
| [xebis.ansible.nftables_firewall](roles/nftables_firewall/README.md) | nftables firewall | `xebis.ansible.apt` |
22-
| `xebis.ansible.obsidian` | Obsidian | `xebis.ansible.snapd` |
23-
| `xebis.ansible.openssh_client` | Installs OpenSSH client and generates SSH key pair. | `xebis.ansible.apt` |
24-
| `xebis.ansible.openssh_server` | Installs OpenSSH server and provides `Restart ssh` handler. | `xebis.ansible.apt` |
25-
| `xebis.ansible.snapd` | Snap daemon | `xebis.ansible.apt` |
26-
| [xebis.ansible.system](roles/system/README.md) | System-related tasks such as reboot handler or reboot when required handler. | |
27-
| [xebis.ansible.tmpfs](roles/tmpfs/README.md) | Sets to mount directories as tmpfs during startup. | `xebis.ansible.system` |
28-
| [`xebis.ansible.users`](roles/users/README.md) | Ansible role for managing system users. | `xebis.ansible.openssh_server` |
29-
| `xebis.ansible.visual_studio_code` | Microsoft Visual Studio Code (Stable) | `xebis.ansible.apt` |
30-
| `xebis.ansible.yq` | yq | `xebis.ansible.apt` |
9+
| Role | Description | Dependencies |
10+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ |
11+
| [xebis.ansible.apt](roles/apt/README.md) | Deb package updates and upgrades using the apt package manager. Can optionally clean up unused packages and reboot the system if required. | `xebis.ansible.system` |
12+
| `xebis.ansible.ansible` | Ansible direnv | `xebis.ansible.apt` |
13+
| [`xebis.ansible.coding_projects`](roles/coding_projects/README.md) | Creates and clones coding projects to `~/Projects` | `xebis.ansible.apt` |
14+
| `xebis.ansible.direnv` | direnv and Bash config for direnv | `xebis.ansible.apt` |
15+
| `xebis.ansible.docker` | Docker direnv | `xebis.ansible.apt`, `xebis.ansible.nftables_firewall` |
16+
| [xebis.ansible.grub](roles/grub/README.md) | GRUB menu configuration. | |
17+
| `xebis.ansible.fail2ban` | Fail2ban IPS | `xebis.ansible.apt` |
18+
| `xebis.ansible.google_chrome` | Google Chrome (Stable) | `xebis.ansible.apt` |
19+
| `xebis.ansible.kde` | KDE firewall and utilities | `xebis.ansible.apt`, `xebis.ansible.nftables_firewall` |
20+
| `xebis.ansible.mc` | Midnight Commander | `xebis.ansible.apt` |
21+
| [xebis.ansible.nftables_firewall](roles/nftables_firewall/README.md) | nftables firewall | `xebis.ansible.apt` |
22+
| `xebis.ansible.obsidian` | Obsidian | `xebis.ansible.snapd` |
23+
| `xebis.ansible.openssh_client` | Installs OpenSSH client and generates SSH key pair. | `xebis.ansible.apt` |
24+
| `xebis.ansible.openssh_server` | Installs OpenSSH server and provides `Restart ssh` handler. | `xebis.ansible.apt` |
25+
| `xebis.ansible.snapd` | Snap daemon | `xebis.ansible.apt` |
26+
| [xebis.ansible.system](roles/system/README.md) | System-related tasks such as reboot handler or reboot when required handler. | |
27+
| [xebis.ansible.tmpfs](roles/tmpfs/README.md) | Sets to mount directories as tmpfs during startup. | `xebis.ansible.system` |
28+
| [`xebis.ansible.users`](roles/users/README.md) | Ansible role for managing system users. | `xebis.ansible.openssh_server` |
29+
| [`xebis.ansible.visual_studio_code`](roles/visual_studio_code/README.md) | Microsoft Visual Studio Code (Stable) | `xebis.ansible.apt` |
30+
| `xebis.ansible.yq` | yq | `xebis.ansible.apt` |
3131

3232
## Installation and Configuration
3333

roles/visual_studio_code/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Xebis.Ansible.Visual_Studio_Code
2+
3+
Ansible role for managing Visual Studio Code.
4+
5+
## Tasks
6+
7+
- Install Visual StudioCode
8+
- Install Visual Studio Code extensions
9+
10+
```yaml
11+
---
12+
- hosts: all
13+
roles:
14+
- role: xebis.ansible.visual_studio_code
15+
vars:
16+
extensions:
17+
- davidanson.vscode-markdownlint
18+
```
19+
20+
## Variables
21+
22+
- `extensions` [list]
23+
- List of extensions installed.
24+
- Default `[]`
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
extensions: []

roles/visual_studio_code/tasks/main.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@
1919
name: code
2020
state: latest
2121
update_cache: true
22+
23+
- name: Install Visual Studio Code extensions
24+
ansible.builtin.shell: code --list-extensions | grep "{{ item }}" || code --install-extension "{{ item }}"
25+
loop: "{{ extensions }}"

test.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,7 @@
5454
- role: xebis.ansible.yq
5555
- role: xebis.ansible.docker
5656
- role: xebis.ansible.visual_studio_code
57+
vars:
58+
extensions:
59+
- davidanson.vscode-markdownlint
60+
- mkhl.direnv

0 commit comments

Comments
 (0)