forked from infra/ansible
homeassistant: Integrate VSCode
This commit is contained in:
parent
ebd11e8738
commit
f4d334cb45
@ -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"
|
||||
|
@ -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
|
||||
|
@ -12,4 +12,5 @@
|
||||
- systemd.yml
|
||||
- installation.yml
|
||||
- grafana.yml
|
||||
- vscode.yml
|
||||
- nginx.yml
|
||||
|
20
roles/homeassistant/tasks/vscode.yml
Normal file
20
roles/homeassistant/tasks/vscode.yml
Normal 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
|
4
roles/homeassistant/templates/config.yaml.j2
Normal file
4
roles/homeassistant/templates/config.yaml.j2
Normal file
@ -0,0 +1,4 @@
|
||||
bind-addr: 127.0.0.1:8080
|
||||
auth: none
|
||||
password: 0000
|
||||
cert: false
|
Loading…
Reference in New Issue
Block a user