2022-02-07 14:24:29 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
- 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 discuss"
|
|
|
|
url: https://discuss.afpy.org/latest.rss
|
|
|
|
link: https://discuss.afpy.org
|
|
|
|
avatar: https://www.afpy.org/static/images/logo.svg
|
|
|
|
|
2022-02-11 09:05:14 +00:00
|
|
|
- name: "AFPy - Mastodon"
|
|
|
|
url: "https://mamot.fr/@AFPy.rss"
|
|
|
|
link: "https://www.afpy.org/"
|
|
|
|
|
2022-02-07 14:24:29 +00:00
|
|
|
- name: "ascendances"
|
|
|
|
url: https://ascendances.wordpress.com/feed/
|
|
|
|
link: https://ascendances.wordpress.com/
|
|
|
|
|
2022-02-11 09:05:14 +00:00
|
|
|
- name: "Bearstech"
|
|
|
|
url: "https://bearstech.com/atom_feed.xml"
|
|
|
|
link: "https://bearstech.com/societe/blog/"
|
|
|
|
|
|
|
|
- name: "Human coders"
|
|
|
|
url: "https://news.humancoders.com/t/python/items/feed"
|
|
|
|
link: "https://news.humancoders.com/t/python"
|
|
|
|
|
|
|
|
- name: "Le blog de Dim'"
|
|
|
|
url: "https://dmerej.info/blog/fr/index.xml"
|
|
|
|
link: "https://dmerej.info/blog/fr"
|
|
|
|
|
|
|
|
- name: "Linuxfr.org"
|
|
|
|
url: "https://linuxfr.org/tags/python/public.atom"
|
|
|
|
link: "https://linuxfr.org/tags/python/public"
|
|
|
|
|
|
|
|
- name: "Olivier Pons"
|
|
|
|
url: "https://www.olivierpons.fr/feed"
|
|
|
|
link: "https://www.olivierpons.fr/"
|
|
|
|
|
|
|
|
- name: "Stella blog"
|
|
|
|
url: "https://ww.stella.coop/blog.rss"
|
|
|
|
link: "https://www.stella.coop/blog-articles"
|
|
|
|
|
|
|
|
- name: "Yaal"
|
2022-02-07 14:24:29 +00:00
|
|
|
url: https://www.yaal.fr/blog/feeds/all.atom.xml
|
|
|
|
link: https://www.yaal.fr/blog/index.html
|
|
|
|
|
2022-02-11 09:05:14 +00:00
|
|
|
- name: "Zeste de savoir - Articles"
|
|
|
|
url: "https://zestedesavoir.com/articles/flux/rss/?tag=python"
|
|
|
|
link: "https://zestedesavoir.com/bibliotheque/?tag=python"
|
|
|
|
|
|
|
|
- name: "Zeste de savoir - Billets"
|
|
|
|
url: "https://zestedesavoir.com/billets/flux/rss/?tag=python"
|
|
|
|
link: "https://zestedesavoir.com/bibliotheque/?tag=python"
|
|
|
|
|
|
|
|
- name: "Zeste de savoir - Tutoriels"
|
|
|
|
url: "https://zestedesavoir.com/tutoriels/flux/rss/?tag=python"
|
|
|
|
link: "https://zestedesavoir.com/bibliotheque/?tag=python"
|
|
|
|
|
2022-02-07 14:24:29 +00:00
|
|
|
dest: /home/makemake/src/datas/sources.yml
|
|
|
|
|
|
|
|
- name: makemake output directory
|
|
|
|
file:
|
|
|
|
state: directory
|
|
|
|
path: /home/makemake/www/
|
|
|
|
owner: makemake
|
|
|
|
group: makemake
|
|
|
|
mode: 0755
|
|
|
|
|
2022-09-29 09:09:21 +00:00
|
|
|
- name: makemake cron errors to email
|
|
|
|
ansible.builtin.cron:
|
|
|
|
name: MAILTO
|
|
|
|
env: yes
|
|
|
|
user: makemake
|
|
|
|
job: admin@afpy.org
|
|
|
|
|
2022-02-07 14:24:29 +00:00
|
|
|
- name: makemake cron
|
|
|
|
ansible.builtin.cron:
|
|
|
|
name: makemake
|
2022-09-29 09:09:21 +00:00
|
|
|
minute: "40"
|
2022-02-07 14:24:29 +00:00
|
|
|
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/"
|