Premier commit
This commit is contained in:
commit
efab10a6e8
7 changed files with 123 additions and 0 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "files/PEWS"]
|
||||||
|
path = files/PEWS
|
||||||
|
url = https://github.com/joshp23/PEWS.git
|
29
README.md
Normal file
29
README.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Role : docker_webfingerserver
|
||||||
|
|
||||||
|
|
||||||
|
## Services fournis
|
||||||
|
|
||||||
|
- Installation d'un serveur PEWS pour fournir le service webfinger sur un serveur docker_host
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Variables
|
||||||
|
|
||||||
|
Fournir les variables suivantes. Par exemple :
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
docker_webfingerserver_local_domain: libretic.fr
|
||||||
|
docker_webfingerserver_data_dir: /data1
|
||||||
|
docker_webfingerserver_service_id: webfinger
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
| Option | Valeur par défaut | Description |
|
||||||
|
|-------------------------------------|-------------------|-------------------------------------------------------------------------------------------|
|
||||||
|
| docker_webfingerserver_local_domain | | Le nom de domaine pour lequel le service webfinger répond |
|
||||||
|
| docker_webfingerserver_data_dir | | L'emplacement dans lequel se trouvent les volumes de donnees docker pour le service |
|
||||||
|
| docker_webfingerserver_service_id | | Le nom de service souhaité : conditionne le nommage des volumes et le routage par traefik |
|
||||||
|
| | | |
|
||||||
|
| | | |
|
||||||
|
|
||||||
|
|
1
files/PEWS
Submodule
1
files/PEWS
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 98888db1f31591cbc1ffb2fc247eac26bfb122bf
|
6
handlers/main.yml
Normal file
6
handlers/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
- name: docker-compose-up
|
||||||
|
shell: |
|
||||||
|
docker-compose up -d
|
||||||
|
args:
|
||||||
|
chdir: /opt/{{ docker_webfingerserver_service_id }}/
|
||||||
|
|
18
tasks/main.yml
Normal file
18
tasks/main.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
- name: docker directory
|
||||||
|
file:
|
||||||
|
path: /opt/{{ docker_webfingerserver_service_id }}/
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: prepare docker-compose.yml
|
||||||
|
template:
|
||||||
|
src: "{{ item }}"
|
||||||
|
dest: /opt/{{ docker_webfingerserver_service_id }}/
|
||||||
|
with_items:
|
||||||
|
- docker-compose.yml
|
||||||
|
notify: docker-compose-up
|
||||||
|
|
||||||
|
- name: prepare PEWS
|
||||||
|
copy:
|
||||||
|
src: PEWS/.well-known
|
||||||
|
dest: "{{ docker_webfingerserver_data_dir }}/{{ docker_webfingerserver_service_id }}/webfinger/"
|
||||||
|
notify: docker-compose-up
|
24
templates/docker-compose.yml
Normal file
24
templates/docker-compose.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
webfinger:
|
||||||
|
image: php:7.4-apache
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Paris
|
||||||
|
volumes:
|
||||||
|
- {{ docker_webfingerserver_data_dir }}/{{ docker_webfingerserver_service_id }}/webfinger:/var/www/html
|
||||||
|
restart: always
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.docker.network=traefik"
|
||||||
|
- "traefik.http.routers.{{ docker_webfingerserver_service_id }}.entrypoints=web"
|
||||||
|
- "traefik.http.routers.{{ docker_webfingerserver_service_id }}.rule=Host(`{{ docker_webfingerserver_local_domain }}`) && PathPrefix(`/.well-known/`)"
|
||||||
|
- "traefik.http.services.{{ docker_webfingerserver_service_id }}.loadbalancer.server.port=80"
|
||||||
|
networks:
|
||||||
|
- traefik
|
||||||
|
|
||||||
|
|
||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
external: true
|
42
templates/user.yml
Normal file
42
templates/user.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
"subject" : "acct:olivier.navas@libretic.fr",
|
||||||
|
"properties" :
|
||||||
|
{
|
||||||
|
"http://packetizer.com/ns/name" : "John Smith",
|
||||||
|
"http://blgx.example.net/ns/version" : "1.5.1",
|
||||||
|
"http://blgx.example.net/ns/ext" : null
|
||||||
|
},
|
||||||
|
"aliases" :
|
||||||
|
[
|
||||||
|
"https://mastodon.libretic.fr/u/olivier.navas",
|
||||||
|
],
|
||||||
|
"links" :
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"rel" : "http://webfinger.net/rel/avatar",
|
||||||
|
"type" : "image/jpeg",
|
||||||
|
"href" : "http://example.com/images/face.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel" : "http://webfinger.net/rel/profile-page",
|
||||||
|
"href" : "http://profile.example.com/u/smithj"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel" : "http://packetizer.com/rel/blog",
|
||||||
|
"href" : "http://blog.example.com/smithj",
|
||||||
|
"titles" :
|
||||||
|
{
|
||||||
|
"en-us" : "The Adventures of John Smith",
|
||||||
|
"fr" : "Les Aventures de John Smith"
|
||||||
|
},
|
||||||
|
"properties" :
|
||||||
|
{
|
||||||
|
"http://example.com/role" : "author"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel" : "http://specs.openid.net/auth/2.0/provider",
|
||||||
|
"href" : "https://profile.example.com/u/smithj"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue