|
1 | 1 | --- |
2 | | -- name: Create directory to keep configfile |
| 2 | +- name: "Create directory to keep configfile" |
3 | 3 | ansible.builtin.file: |
4 | | - dest: "/opt/openconext/voot" |
5 | | - state: directory |
6 | | - owner: root |
7 | | - group: root |
| 4 | + path: "/opt/openconext/voot" |
| 5 | + state: "directory" |
| 6 | + owner: "root" |
| 7 | + group: "root" |
8 | 8 | mode: "0770" |
9 | 9 |
|
10 | | -- name: Place the serverapplication configfiles |
| 10 | +- name: "Place the serverapplication configfiles" |
11 | 11 | ansible.builtin.template: |
12 | 12 | src: "{{ item }}.j2" |
13 | | - dest: /opt/openconext/voot/{{ item }} |
14 | | - owner: root |
15 | | - group: root |
| 13 | + dest: "/opt/openconext/voot/{{ item }}" |
| 14 | + owner: "root" |
| 15 | + group: "root" |
16 | 16 | mode: "0644" |
17 | 17 | with_items: |
18 | | - - serverapplication.yml |
19 | | - - logback.xml |
20 | | - - externalProviders.yml |
21 | | - notify: restart vootserver |
| 18 | + - "serverapplication.yml" |
| 19 | + - "logback.xml" |
| 20 | + - "externalProviders.yml" |
| 21 | + notify: "Restart vootserver" |
22 | 22 |
|
23 | | -- name: Create and start the server container |
| 23 | +- name: "Create and start the server container" |
24 | 24 | community.docker.docker_container: |
25 | | - name: vootserver |
| 25 | + name: "vootserver" |
26 | 26 | env: |
27 | 27 | TZ: "{{ timezone }}" |
28 | | - image: ghcr.io/openconext/openconext-voot/voot:{{ voot_version }} |
| 28 | + image: "ghcr.io/openconext/openconext-voot/voot:{{ voot_version }}" |
29 | 29 | pull: true |
30 | 30 | restart_policy: "{{ voot_server_restart_policy }}" |
31 | 31 | restart_retries: "{{ voot_server_restart_retries }}" # Only for restart policy on-failure |
32 | | - state: started |
| 32 | + state: "started" |
33 | 33 | networks: |
34 | 34 | - name: "loadbalancer" |
35 | 35 | mounts: |
36 | | - - source: /opt/openconext/voot/serverapplication.yml |
37 | | - target: /application.yml |
38 | | - type: bind |
39 | | - - source: /opt/openconext/voot/externalProviders.yml |
40 | | - target: /externalProviders.yml |
41 | | - type: bind |
42 | | - - source: /opt/openconext/voot/logback.xml |
43 | | - target: /logback.xml |
44 | | - type: bind |
| 36 | + - source: "/opt/openconext/voot/serverapplication.yml" |
| 37 | + target: "/application.yml" |
| 38 | + type: "bind" |
| 39 | + - source: "/opt/openconext/voot/externalProviders.yml" |
| 40 | + target: "/externalProviders.yml" |
| 41 | + type: "bind" |
| 42 | + - source: "/opt/openconext/voot/logback.xml" |
| 43 | + target: "/logback.xml" |
| 44 | + type: "bind" |
45 | 45 | command: "-Xmx128m --spring.config.location=./" |
46 | 46 | etc_hosts: |
47 | | - host.docker.internal: host-gateway |
| 47 | + host.docker.internal: "host-gateway" |
48 | 48 | labels: |
49 | 49 | traefik.http.routers.voot.rule: "Host(`voot.{{ base_domain }}`)" |
50 | 50 | traefik.http.routers.voot.tls: "true" |
51 | 51 | traefik.enable: "true" |
52 | 52 | healthcheck: |
53 | 53 | test: |
54 | | - [ |
55 | | - "CMD", |
56 | | - "wget", |
57 | | - "-no-verbose", |
58 | | - "--tries=1", |
59 | | - "--spider", |
60 | | - "http://localhost:8080/internal/health", |
61 | | - ] |
62 | | - interval: 10s |
63 | | - timeout: 10s |
64 | | - retries: 3 |
65 | | - start_period: 10s |
66 | | - notify: restart vootserver |
| 54 | + - "CMD" |
| 55 | + - "wget" |
| 56 | + - "-no-verbose" |
| 57 | + - "--tries=1" |
| 58 | + - "--spider" |
| 59 | + - "http://localhost:8080/internal/health" |
| 60 | + interval: "10s" |
| 61 | + timeout: "10s" |
| 62 | + retries: "3" |
| 63 | + start_period: "10s" |
| 64 | + register: "voot_container" |
| 65 | + notify: "Restart vootserver" |
67 | 66 |
|
68 | | -- name: Include the role manage_provision to provision the client_credentials client |
| 67 | +- name: "Include the role manage_provision to provision the client_credentials client" |
69 | 68 | ansible.builtin.include_role: |
70 | | - name: manage_provision |
| 69 | + name: "manage_provision" |
71 | 70 | vars: |
72 | | - manage_provision_entity_type: oauth20_rs |
| 71 | + manage_provision_entity_type: "oauth20_rs" |
73 | 72 | manage_provision_oauth_rs_client_id: "{{ voot_manage_provision_oauth_rs_client_id }}" |
74 | 73 | manage_provision_oauth_rs_name_en: "{{ voot_manage_provision_oauth_rs_name_en }}" |
75 | 74 | manage_provision_oauth_rs_description_en: "{{ voot_manage_provision_oauth_rs_description_en }}" |
|
0 commit comments