mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
initial cleanup server-manager
This commit is contained in:
3
roles/native-homepage/meta/main.yml
Normal file
3
roles/native-homepage/meta/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
dependencies:
|
||||
- native-https-server
|
||||
- native-git
|
12
roles/native-homepage/tasks/main.yml
Normal file
12
roles/native-homepage/tasks/main.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
- name: configure {{domain}}.conf
|
||||
template: src=homepage.nginx.conf dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||
notify: restart nginx
|
||||
|
||||
- name: recieve {{domain}} certificate
|
||||
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
|
||||
|
||||
- name: homepage repo git
|
||||
git:
|
||||
repo: "{{homepage_repository_address}}"
|
||||
dest: "/usr/share/nginx/homepage"
|
||||
update: yes
|
23
roles/native-homepage/templates/homepage.nginx.conf
Normal file
23
roles/native-homepage/templates/homepage.nginx.conf
Normal file
@@ -0,0 +1,23 @@
|
||||
#default
|
||||
server
|
||||
{
|
||||
server_name {{domain}};
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_cache shared:SSL:50m;
|
||||
ssl_session_tickets off;
|
||||
ssl_prefer_server_ciphers on;
|
||||
add_header Strict-Transport-Security max-age=15768000;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
ssl_certificate /etc/letsencrypt/live/{{domain}}/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/{{domain}}/privkey.pem;
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/{{domain}}/chain.pem;
|
||||
|
||||
location /
|
||||
{
|
||||
root /usr/share/nginx/homepage;
|
||||
index index.html index.htm;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user