This repository has been archived by the owner on Nov 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7766f80
commit 8c8d221
Showing
3 changed files
with
101 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,6 @@ deb2.afpy.org | |
|
||
[discord_irc_sync] | ||
deb2.afpy.org | ||
|
||
[makemake] | ||
deb2.afpy.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
--- | ||
|
||
- hosts: makemake | ||
tasks: | ||
- name: A user for makemake | ||
user: | ||
name: makemake | ||
|
||
- name: Clone makemake | ||
become: true | ||
become_user: makemake | ||
git: | ||
repo: https://framagit.org/makemake/makemake | ||
dest: /home/makemake/src/ | ||
|
||
- name: install makemake requirements | ||
become: true | ||
become_user: makemake | ||
pip: | ||
requirements: /home/makemake/src/requirements.txt | ||
virtualenv_command: /usr/bin/python3 -m venv | ||
virtualenv: /home/makemake/venv/ | ||
|
||
- name: makemake nginx | ||
include_role: name=nginx | ||
vars: | ||
nginx_owner: makemake | ||
nginx_domain: planet.afpy.org | ||
nginx_certificates: [planet.afpy.org] | ||
nginx_conf: | | ||
server | ||
{ | ||
listen [::]:80; listen 80; | ||
server_name planet.afpy.org; | ||
access_log /var/log/nginx/planet.afpy.org-access.log; | ||
error_log /var/log/nginx/planet.afpy.org-error.log; | ||
return 301 https://$host$request_uri; | ||
} | ||
server | ||
{ | ||
listen [::]:443 ssl; listen 443 ssl; | ||
server_name planet.afpy.org; | ||
access_log /var/log/nginx/planet.afpy.org-access.log; | ||
error_log /var/log/nginx/planet.afpy.org-error.log; | ||
include snippets/letsencrypt-planet.afpy.org.conf; | ||
root /home/makemake/www/; | ||
} | ||
- name: Configure feeds | ||
copy: | ||
content: | | ||
--- | ||
- name: "AFPy jobs" | ||
url: https://www.afpy.org/feed/emplois/rss.xml | ||
link: https://www.afpy.org/emplois | ||
avatar: https://www.afpy.org/static/images/logo.svg | ||
- name: "AFPy discuss" | ||
url: https://discuss.afpy.org/latest.rss | ||
link: https://discuss.afpy.org | ||
avatar: https://www.afpy.org/static/images/logo.svg | ||
- name: "ascendances" | ||
url: https://ascendances.wordpress.com/feed/ | ||
link: https://ascendances.wordpress.com/ | ||
- name: Yaal | ||
url: https://www.yaal.fr/blog/feeds/all.atom.xml | ||
link: https://www.yaal.fr/blog/index.html | ||
dest: /home/makemake/src/datas/sources.yml | ||
|
||
- name: makemake output directory | ||
file: | ||
state: directory | ||
path: /home/makemake/www/ | ||
owner: makemake | ||
group: makemake | ||
mode: 0755 | ||
|
||
- name: makemake cron | ||
ansible.builtin.cron: | ||
name: makemake | ||
minute: "0" | ||
user: makemake | ||
job: "cd /home/makemake/src/; /home/makemake/venv/bin/python /home/makemake/src/update.py --static /home/makemake/www/" | ||
|
||
- name: run makemake once | ||
become: true | ||
become_user: makemake | ||
shell: "cd /home/makemake/src/; /home/makemake/venv/bin/python /home/makemake/src/update.py --static /home/makemake/www/" |