Install actual on Raspberry Pi

This commit is contained in:
Thomas Kleinendorst 2024-04-12 13:34:45 +02:00
parent 64fa1562dd
commit 6c0425418e
9 changed files with 109 additions and 8 deletions

View file

@ -3,3 +3,8 @@
become: true
ansible.builtin.command:
cmd: snap set certbot trust-plugin-with-root=ok
- name: Restart Nginx
become: true
ansible.builtin.systemd:
name: nginx.service
state: restarted

View file

@ -19,8 +19,12 @@
ansible.builtin.apt:
name: nginx # Creates the "nginx" user as well
state: present
# TODO: Remove the default configuration here, we'll keep it for now as an example...
# TODO: Setup Certbot as it's part of the installation...
- name: Remove default configuration
become: true
ansible.builtin.file:
path: /etc/nginx/conf.d/default.conf
state: absent
notify: Restart Nginx
# ---------- CERTBOT INSTALLATION ---------- #
# See the installation instructions here: https://certbot.eff.org/instructions?ws=nginx&os=debianbuster&tab=wildcard
- name: Install Certbot

View file

@ -1,6 +1,7 @@
#!/bin/bash
/snap/bin/certbot certonly \
--dns-cloudflare \
--dns-cloudflare-propagation-seconds 120 \
--dns-cloudflare-credentials '{{ cloudflare_credential_dir_path }}/{{ cloudflare_credential_filename }}' \
--agree-tos --test-cert -m {{ administration_email }} \
--agree-tos -m {{ administration_email }} \
-d $1