Euh tout est bon pour forgehook?
This commit is contained in:
parent
a74ae14b48
commit
910479a37f
|
@ -9,7 +9,7 @@ peers:
|
|||
packages:
|
||||
debian: [ subversion, mercurial, htop, tmux, vim, emacs, mutt, weechat, elinks, rsync, dnsutils, make, g++, libssl-dev, mosh, gopher, sl ]
|
||||
rust: [ lsd ]
|
||||
custom: [ zola, ttbp ]
|
||||
custom: [ zola, ttbp, forgehook ]
|
||||
users:
|
||||
- name: tofu
|
||||
sudo: true
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
location /.well-known/forgehook {
|
||||
alias /opt/forgehook/source/public;
|
||||
index index.html index.php;
|
||||
try_files $uri $uri/ /index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi.conf;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_pass unix:/opt/forgehook/php.sock;
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
../webserver/handlers/
|
|
@ -17,7 +17,7 @@
|
|||
shell:
|
||||
chdir: /opt/forgehook/source
|
||||
cmd: bash setup.sh
|
||||
when: repo_updated.changed
|
||||
when: repo_update.changed
|
||||
|
||||
# TODO: Ici on présume très très fortement que webserver est activé et PHP installé -> mettre en place un vrai système d'interface entre rôles
|
||||
# TODO: Here we strongly assume webserver is enabled and PHP setup -> need a real interface/dependency system between roles
|
||||
|
@ -27,24 +27,15 @@
|
|||
src: ../../files/forgehook/php.conf
|
||||
dest: /etc/php/7.3/fpm/pool.d/forgehook.conf
|
||||
notify: webserver-reload-php
|
||||
failed_when: "webserver" not in roles
|
||||
|
||||
- name: custom-forgehook-endpoint
|
||||
copy:
|
||||
remote_src: yes
|
||||
src: /opt/forgehook/source/endpoints/endpoint.php
|
||||
src: /opt/forgehook/source/endpoints/index.php
|
||||
dest: /opt/forgehook/source/public/index.php
|
||||
|
||||
- name: custom-forgehook-nginx
|
||||
blockinfile:
|
||||
validate: nginx -t
|
||||
insertbefore: "location / {"
|
||||
block: |
|
||||
location /.well-known/forgehook {
|
||||
include snippets/fastcgi-php.conf;
|
||||
root /opt/forgehook/source/public;
|
||||
try_files $uri $uri/ /index.php;
|
||||
fastcgi_pass unix:/opt/forgehook/php.sock;
|
||||
}
|
||||
copy:
|
||||
src: ../../files/forgehook/nginx.conf
|
||||
dest: /etc/nginx/conf.d/well-known/forgehook.conf
|
||||
notify: webserver-reload-nginx
|
||||
failed_when: "webserver" not in roles
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
# Pour l'instant, il n'est pas possible d'avoir un paquet qui ne porte pas le nom de son binaire
|
||||
# parce qu'on vérifie que le binaire est installé
|
||||
# A terme, ça sera à chaque paquet de vérifier lui-même s'il est installé
|
||||
|
||||
# Vérifier quels paquets custom sont installés
|
||||
- stat:
|
||||
path: "/usr/local/bin/{{ item }}"
|
||||
loop: "{{ packages.custom }}"
|
||||
register: custom_exists
|
||||
|
||||
- name: "Installer les paquets custom activés dans la config"
|
||||
include: "{{ item.item }}/main.yml"
|
||||
loop: "{{ custom_exists.results | default([]) }}"
|
||||
when: not item.stat.exists
|
||||
include: "{{ item }}/main.yml"
|
||||
loop: "{{ packages.custom }}"
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
# Donc on copie un binaire que j'ai compilé avec amour
|
||||
- name: custom-zola-setup
|
||||
copy:
|
||||
src: ../../files/bin/zola
|
||||
src: ../../files/zola/zola
|
||||
dest: /usr/local/bin/zola
|
||||
mode: 0755
|
||||
|
|
|
@ -31,6 +31,8 @@ server {
|
|||
#try_files $2 $2/ = 404;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/well-known/*.conf;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
service: name=nginx state=restarted
|
||||
|
||||
- name: webserver-reload-php
|
||||
service: name=php-fpm state=restarted
|
||||
service: name=php7.3-fpm state=restarted
|
||||
|
|
|
@ -16,6 +16,11 @@
|
|||
dest: /etc/nginx/conf.d/ssl.conf
|
||||
notify: webserver-reload-nginx
|
||||
|
||||
- name: TODO
|
||||
file:
|
||||
path: /etc/nginx/conf.d/well-known
|
||||
state: directory
|
||||
|
||||
- name: webserver-personal-pages
|
||||
include: pages_perso.yml
|
||||
|
||||
|
|
Loading…
Reference in New Issue