1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-02-13 19:51:18 +00:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Yohann D'ANELLO
893534955d
Use the Debian mirror of Crans
Signed-off-by: Yohann D'ANELLO <yohann.danello@gmail.com>
2020-12-30 00:04:08 +01:00
Yohann D'ANELLO
dfbf9972c2
By default, automatically change directory to /var/www/note_kfet and source the Python virtual environment in the .bashrc file
Signed-off-by: Yohann D'ANELLO <yohann.danello@gmail.com>
2020-12-29 23:27:51 +01:00
Yohann D'ANELLO
b5f3b3ffc1
Use Nginx certbot challenge
Signed-off-by: Yohann D'ANELLO <yohann.danello@gmail.com>
2020-12-29 21:44:28 +01:00
Yohann D'ANELLO
3aad4e7398
Agree Let's Encrypt ToS
Signed-off-by: Yohann D'ANELLO <yohann.danello@gmail.com>
2020-12-29 21:41:29 +01:00
5 changed files with 14 additions and 3 deletions

View File

@ -7,7 +7,7 @@
prompt: "Password of the database (leave it blank to skip database init)" prompt: "Password of the database (leave it blank to skip database init)"
private: yes private: yes
vars: vars:
mirror: deb.debian.org mirror: mirror.crans.org
roles: roles:
- 1-apt-basic - 1-apt-basic
- 2-nk20 - 2-nk20

View File

@ -3,3 +3,4 @@ note:
server_name: note.crans.org server_name: note.crans.org
git_branch: master git_branch: master
cron_enabled: true cron_enabled: true
email: notekfet2020@lists.crans.org

View File

@ -36,3 +36,13 @@
dest: /etc/cron.d/note dest: /etc/cron.d/note
owner: root owner: root
group: root group: root
- name: Set default directory to /var/www/note_kfet
lineinfile:
path: /etc/skel/.bashrc
line: 'cd /var/www/note_kfet'
- name: Automatically source Python virtual environment
lineinfile:
path: /etc/skel/.bashrc
line: 'source /var/www/note_kfet/env/bin/activate'

View File

@ -31,7 +31,7 @@
state: stopped state: stopped
- name: Generate new certificate if one doesn't exist. - name: Generate new certificate if one doesn't exist.
shell: "certbot certonly --non-interactive --config /etc/letsencrypt/conf.d/nk20.ini -d {{note.server_name}}" shell: "certbot certonly --non-interactive --agree-tos --config /etc/letsencrypt/conf.d/nk20.ini -d {{note.server_name}}"
when: letsencrypt_cert.stat.exists == False when: letsencrypt_cert.stat.exists == False
- name: Restart services to allow certbot to generate a cert. - name: Restart services to allow certbot to generate a cert.

View File

@ -16,5 +16,5 @@ email = {{ note.email }}
text = True text = True
# Use DNS-01 challenge # Use DNS-01 challenge
authenticator = standalone authenticator = nginx