first commit
This commit is contained in:
commit
c36accd784
77
hugo.yml
Normal file
77
hugo.yml
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
- name: blog with hugo
|
||||||
|
hosts: defiant.dedyn.io
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: Packages for blog with hugo
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- hugo
|
||||||
|
update_cache: no
|
||||||
|
install_recommends: no
|
||||||
|
|
||||||
|
- name: /etc/systemd/system/hugo-blog.service
|
||||||
|
blockinfile:
|
||||||
|
path: /etc/systemd/system/hugo-blog.service
|
||||||
|
create: yes
|
||||||
|
mode: "0444"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
||||||
|
block: |
|
||||||
|
[Unit]
|
||||||
|
Description=Websockify NoVNC
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/home/docker/nextcloud.defiant.dedyn.io/nextcloud-data/data/olli/files/Projekte/hugo/gabosh-blog
|
||||||
|
ExecStart=hugo server --bind=192.168.41.1 --port=1313 --baseURL=https://blog.defiant.dedyn.io --buildDrafts --disableFastRender --appendPort=false
|
||||||
|
KillMode=process
|
||||||
|
Restart=on-failure
|
||||||
|
RestartPreventExitStatus=255
|
||||||
|
RuntimeDirectory=websockify
|
||||||
|
RuntimeDirectoryMode=0755
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=hugo-blog.service
|
||||||
|
backup: yes
|
||||||
|
notify:
|
||||||
|
- Restart hugo-blog
|
||||||
|
|
||||||
|
- name: /home/docker/traefik/providers/hugo-blog.yml Hugo<->Traefik provider
|
||||||
|
blockinfile:
|
||||||
|
path: /home/docker/traefik/providers/hugo-blog.yml
|
||||||
|
create: yes
|
||||||
|
mode: 0444
|
||||||
|
owner: root
|
||||||
|
group: docker
|
||||||
|
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
||||||
|
block: |
|
||||||
|
http:
|
||||||
|
routers:
|
||||||
|
hugo-blog:
|
||||||
|
rule: "Host(`blog.defiant.dedyn.io`) || Host(`blog.gabosh.net`)"
|
||||||
|
service: hugo-blog
|
||||||
|
entryPoints:
|
||||||
|
- "https"
|
||||||
|
tls:
|
||||||
|
certresolver:
|
||||||
|
- "letsencrypt"
|
||||||
|
middlewares:
|
||||||
|
- "secHeaders@file"
|
||||||
|
services:
|
||||||
|
hugo-blog:
|
||||||
|
loadBalancer:
|
||||||
|
servers:
|
||||||
|
- url: "http://192.168.41.1:1313"
|
||||||
|
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
|
||||||
|
- name: Restart hugo-blog
|
||||||
|
service:
|
||||||
|
name: hugo-blog
|
||||||
|
state: restarted
|
||||||
|
|
Loading…
Reference in New Issue
Block a user