first commit
This commit is contained in:
commit
4be491289c
86
novnc.yml
Normal file
86
novnc.yml
Normal file
@ -0,0 +1,86 @@
|
||||
---
|
||||
- name: novnc
|
||||
hosts: tor-nas.dedyn.io defiant.dedyn.io
|
||||
tasks:
|
||||
|
||||
- name: Packages for novnc
|
||||
apt:
|
||||
name:
|
||||
- novnc
|
||||
update_cache: no
|
||||
install_recommends: no
|
||||
|
||||
- name: /etc/systemd/system/websockify-novnc.service
|
||||
blockinfile:
|
||||
path: /etc/systemd/system/websockify-novnc.service
|
||||
create: yes
|
||||
mode: "0444"
|
||||
owner: root
|
||||
group: root
|
||||
marker: "# {mark} tor-nas ANSIBLE MANAGED BLOCK"
|
||||
block: |
|
||||
[Unit]
|
||||
Description=Websockify NoVNC
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/websockify --web=/usr/share/novnc 0.0.0.0:8000 127.0.0.1:5900
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
RestartPreventExitStatus=255
|
||||
RuntimeDirectory=websockify
|
||||
RuntimeDirectoryMode=0755
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=websockify-novnc.service
|
||||
backup: yes
|
||||
notify:
|
||||
- Restart websockify-novnc
|
||||
|
||||
- name: 'add websockify-novnc to startup'
|
||||
command: systemctl enable websockify-novnc
|
||||
args:
|
||||
creates: /etc/systemd/system/multi-user.target.wants/websockify-novnc.service
|
||||
|
||||
- name: /home/docker/traefik/providers/novnc.yml Webmin<->Traefik provider
|
||||
blockinfile:
|
||||
path: /home/docker/traefik/providers/novnc.yml
|
||||
create: yes
|
||||
mode: 0444
|
||||
owner: root
|
||||
group: docker
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
||||
block: |
|
||||
http:
|
||||
routers:
|
||||
novnc:
|
||||
rule: "Host(`novnc.{{inventory_hostname}}`)"
|
||||
service: novnc
|
||||
entryPoints:
|
||||
- "https"
|
||||
tls:
|
||||
certresolver:
|
||||
- "letsencrypt"
|
||||
middlewares:
|
||||
- "secHeaders@file"
|
||||
- "auth-novnc"
|
||||
services:
|
||||
novnc:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://192.168.41.1:8000"
|
||||
middlewares:
|
||||
auth-novnc:
|
||||
basicauth:
|
||||
users: "admin:$apr1$XLxGs/Ba$3phZ1a2RtfExOp8x6NFjZ."
|
||||
|
||||
|
||||
handlers:
|
||||
|
||||
- name: Restart websockify-novnc
|
||||
service:
|
||||
name: websockify-novnc
|
||||
state: restarted
|
||||
|
Loading…
Reference in New Issue
Block a user