quick update
Signed-off-by: Thomas Schmid <tom@lfence.de>
This commit is contained in:
parent
aa6286623d
commit
d6a87fdd48
4
hosts
4
hosts
@ -1,4 +1,6 @@
|
||||
noodlehub.binary.kitchen
|
||||
cannelloni.binary.kitchen
|
||||
bkvoron
|
||||
|
||||
[3D_Printers]
|
||||
spaghetti.binary.kitchen
|
||||
@ -9,5 +11,5 @@ maccaroni.binary.kitchen
|
||||
[Octoprint_hosts]
|
||||
spaghetti.binary.kitchen
|
||||
maccaroni.binary.kitchen
|
||||
cannelloni.binary.kitchen
|
||||
#cannelloni.binary.kitchen
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
[server]
|
||||
host: {{ moonraker_host }}
|
||||
port: {{ moonraker_port }}
|
||||
klippy_uds_address: /tmp/klipper_uds
|
||||
|
||||
[file_manager]
|
||||
config_path: {{ moonraker_file_manager_config_path }}
|
||||
@ -12,13 +13,15 @@ enable_object_processing: True
|
||||
trusted_clients:
|
||||
0.0.0.0/0
|
||||
|
||||
[secrets]
|
||||
secrets_path: /etc/moonraker/passwd
|
||||
|
||||
[octoprint_compat]
|
||||
|
||||
[history]
|
||||
|
||||
[zeroconf]
|
||||
|
||||
|
||||
[mqtt]
|
||||
address: pizza.binary.kitchen
|
||||
username: 3dprinter
|
||||
password: Su7nu3oof6ah
|
||||
instance_name: MainC/Lab/3dPrinter/cannelloni
|
||||
publish_split_status: True
|
||||
|
@ -7,6 +7,7 @@ octoprint_has_webcam: false
|
||||
|
||||
octoprint_default_plugins:
|
||||
- "https://github.com/OctoPrint/OctoPrint-MQTT/archive/master.zip"
|
||||
- "https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip"
|
||||
|
||||
octoprint_config_salt: "{{ octoprint_salt }}"
|
||||
octoprint_config_api_key: "{{ octoprint_api_key}}"
|
||||
|
@ -5,10 +5,11 @@ appearance:
|
||||
|
||||
accessControl:
|
||||
salt: "{{ octoprint_config_salt }}"
|
||||
autologinLocal: true
|
||||
autologinAs: binarykitchen
|
||||
localNetworks:
|
||||
- 127.0.0.0/8
|
||||
- 172.23.0.0/16
|
||||
- 172.23.3.0/24
|
||||
|
||||
api:
|
||||
key: "{{ octoprint_config_api_key }}"
|
||||
@ -16,6 +17,10 @@ api:
|
||||
plugins:
|
||||
tracking:
|
||||
enabled: false
|
||||
announcements:
|
||||
enabled_channels:
|
||||
- _important
|
||||
- _releases
|
||||
|
||||
printerProfiles:
|
||||
default: {{ octoprint_config_default_profile }}
|
||||
|
@ -1,66 +1,66 @@
|
||||
{% if not octoprint_ssl %}
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name {{ octoprint_domain }};
|
||||
server_name {{ octoprint_domain }};
|
||||
|
||||
location /webcam/ {
|
||||
postpone_output 0;
|
||||
proxy_buffering off;
|
||||
proxy_ignore_headers X-Accel-Buffering;
|
||||
proxy_pass http://localhost:8080/;
|
||||
}
|
||||
location /webcam/ {
|
||||
postpone_output 0;
|
||||
proxy_buffering off;
|
||||
proxy_ignore_headers X-Accel-Buffering;
|
||||
proxy_pass http://localhost:8080/;
|
||||
}
|
||||
|
||||
location / {
|
||||
client_max_body_size 1024M;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
location / {
|
||||
client_max_body_size 1024M;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://localhost:5000;
|
||||
}
|
||||
proxy_pass http://localhost:5000;
|
||||
}
|
||||
}
|
||||
{% else %}
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name {{ octoprint_domain }};
|
||||
server_name {{ octoprint_domain }};
|
||||
|
||||
location /.well-known/acme-challenge {
|
||||
default_type "text/plain";
|
||||
alias /var/www/acme-challenge;
|
||||
}
|
||||
location /.well-known/acme-challenge {
|
||||
default_type "text/plain";
|
||||
alias /var/www/acme-challenge;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://{{ octoprint_domain }}$request_uri;
|
||||
}
|
||||
location / {
|
||||
return 301 https://{{ octoprint_domain }}$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name {{ gitea_domain }};
|
||||
server_name {{ gitea_domain }};
|
||||
|
||||
ssl_certificate_key /etc/nginx/ssl/{{ gitea_domain }}.key;
|
||||
ssl_certificate /etc/nginx/ssl/{{ gitea_domain }}.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/{{ gitea_domain }}.key;
|
||||
ssl_certificate /etc/nginx/ssl/{{ gitea_domain }}.crt;
|
||||
|
||||
location / {
|
||||
client_max_body_size 1024M;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
location / {
|
||||
client_max_body_size 1024M;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_set_header X-Script-Name /octoprint;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://localhost:5000;
|
||||
}
|
||||
proxy_pass http://localhost:5000;
|
||||
}
|
||||
}
|
||||
{% endif %}
|
||||
|
2
roles/ustreamer/defaults/main.yml
Normal file
2
roles/ustreamer/defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
ustreamer_user: ustreamer
|
||||
ustreamer_group: ustreamer
|
5
roles/ustreamer/handlers/main.yml
Normal file
5
roles/ustreamer/handlers/main.yml
Normal file
@ -0,0 +1,5 @@
|
||||
- name: Reload systemd
|
||||
systemd: daemon_reload=yes
|
||||
|
||||
- name: Restart ustreamer
|
||||
service: name=ustreamer state=restared
|
29
roles/ustreamer/tasks/main.yml
Normal file
29
roles/ustreamer/tasks/main.yml
Normal file
@ -0,0 +1,29 @@
|
||||
- name: Create group
|
||||
group:
|
||||
name: "{{ ustreamer_group }}"
|
||||
|
||||
- name: Create user
|
||||
user:
|
||||
name: "{{ ustreamer_user }}"
|
||||
group: "{{ ustreamer_group }}"
|
||||
append: yes
|
||||
groups:
|
||||
- video
|
||||
|
||||
- name: Install ustreamer dependencies
|
||||
apt:
|
||||
name:
|
||||
- ffmpeg
|
||||
- ustreamer
|
||||
|
||||
- name: Install systemd unit
|
||||
template: src=ustreamer.service.j2 dest=/lib/systemd/system/ustreamer.service
|
||||
notify:
|
||||
- Reload systemd
|
||||
- Restart ustreamer
|
||||
|
||||
- name: Enable and start ustreamer
|
||||
service:
|
||||
name: ustreamer
|
||||
state: started
|
||||
enabled: yes
|
19
roles/ustreamer/templates/ustreamer.service.j2
Normal file
19
roles/ustreamer/templates/ustreamer.service.j2
Normal file
@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=Ustreamer
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
RestartSec=2s
|
||||
Type=simple
|
||||
User={{ ustreamer_user }}
|
||||
Group={{ ustreamer_user }}
|
||||
{% if ustreamer_args is defined %}
|
||||
ExecStart=/usr/bin/ustreamer {{ustreamer_args}}
|
||||
{% else %}
|
||||
ExecStart=/usr/bin/ustreamer
|
||||
{% endif %}
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
13
site.yml
13
site.yml
@ -4,20 +4,7 @@
|
||||
- common
|
||||
- root_keys
|
||||
|
||||
- name: Setup noodlehub
|
||||
hosts: noodlehub.binary.kitchen
|
||||
roles:
|
||||
- noodlehub
|
||||
tags: noodlehub
|
||||
|
||||
- name: Setup klipper
|
||||
hosts: cannelloni.binary.kitchen
|
||||
roles:
|
||||
- klipper
|
||||
tags: klipper
|
||||
|
||||
- name: Setup octoprint
|
||||
hosts: [Octoprint_hosts]
|
||||
roles:
|
||||
- octoprint
|
||||
tags: octoprint
|
@ -1,10 +1,5 @@
|
||||
- name: Setup common rules
|
||||
hosts: raspberrypi
|
||||
- name: Setup mainsail
|
||||
hosts: cannelloni.binary.kitchen
|
||||
roles:
|
||||
- common
|
||||
- root_keys
|
||||
|
||||
- name: Setup octoprint
|
||||
hosts: raspberrypi
|
||||
roles:
|
||||
- octoprint
|
||||
- moonraker
|
||||
- mainsail
|
Loading…
Reference in New Issue
Block a user