42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
- name: custom-forgehook-user
|
|
user:
|
|
name: __forgehook
|
|
state: present
|
|
shell: /bin/bash
|
|
system: no
|
|
createhome: yes
|
|
home: /opt/forgehook
|
|
|
|
- name: custom-forgehook-clone
|
|
git:
|
|
repo: https://tildegit.org/southerntofu/webhook
|
|
dest: /opt/forgehook/source
|
|
register: repo_update
|
|
|
|
- name: custom-forgehook-setup
|
|
shell:
|
|
chdir: /opt/forgehook/source
|
|
cmd: bash setup.sh
|
|
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
|
|
|
|
- name: custom-forgehook-phpconf
|
|
copy:
|
|
src: ../../files/forgehook/php.conf
|
|
dest: /etc/php/7.3/fpm/pool.d/forgehook.conf
|
|
notify: webserver-reload-php
|
|
|
|
- name: custom-forgehook-endpoint
|
|
copy:
|
|
remote_src: yes
|
|
src: /opt/forgehook/source/endpoints/index.php
|
|
dest: /opt/forgehook/source/public/index.php
|
|
|
|
- name: custom-forgehook-nginx
|
|
copy:
|
|
src: ../../files/forgehook/nginx.conf
|
|
dest: /etc/nginx/conf.d/well-known/forgehook.conf
|
|
notify: webserver-reload-nginx
|