homeassistant: Integrate VSCode

This commit is contained in:
Thomas Basler 2025-01-06 19:59:15 +01:00
parent ebd11e8738
commit f4d334cb45
5 changed files with 32 additions and 0 deletions

View File

@ -20,3 +20,5 @@ ha_pg_db_pass: xxxxx
ha_pg_grafana_db_name: grafana
ha_pg_grafana_db_user: grafana
ha_pg_grafana_db_pass: xxxxx
ha_vscode_version: "4.96.2"

View File

@ -19,3 +19,8 @@
ansible.builtin.service:
name: nginx
state: restarted
- name: Restart code-server
ansible.builtin.service:
name: code-server@{{ ha_user }}
state: restarted

View File

@ -12,4 +12,5 @@
- systemd.yml
- installation.yml
- grafana.yml
- vscode.yml
- nginx.yml

View File

@ -0,0 +1,20 @@
---
- name: Install VSCode
ansible.builtin.apt:
deb: https://github.com/coder/code-server/releases/download/v{{ ha_vscode_version }}/code-server_{{ ha_vscode_version }}_amd64.deb
- name: Enable VSCode service
ansible.builtin.systemd_service:
name: code-server@{{ ha_user }}
state: restarted
enabled: true
- name: Install config file
ansible.builtin.template:
src: config.yaml.j2
dest: "/home/homeassistant/.config/code-server/config.yaml"
owner: homeassistant
group: homeassistant
mode: "0644"
notify: Restart code-server

View File

@ -0,0 +1,4 @@
bind-addr: 127.0.0.1:8080
auth: none
password: 0000
cert: false