Skip to content

Commit 36d145a

Browse files
committed
ansible-lint
1 parent de70cbf commit 36d145a

4 files changed

Lines changed: 50 additions & 48 deletions

File tree

‎roles/voot/defaults/main.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ voot_manage_provision_oauth_rs_rp_secret: "{{ voot.oidcng_checkToken_secret }}"
44
voot_manage_provision_oauth_rs_name_en: "{{ instance_name }} VOOT Resource Server"
55
voot_manage_provision_oauth_rs_description_en: "The VOOT API is for group membership information"
66
voot_manage_provision_oauth_rs_scopes: "groups"
7-
voot_server_restart_policy: always
7+
voot_server_restart_policy: "always"
88
voot_server_restart_retries: 0

‎roles/voot/handlers/main.yml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
2-
- name: restart vootserver
2+
- name: "Restart vootserver"
33
community.docker.docker_container:
4-
name: vootserver
5-
state: started
4+
name: "vootserver"
5+
state: "started"
66
restart: true
7+
# avoid restarting it creates unexpected data loss according to docker_container_module notes
8+
comparisons:
9+
'*': "ignore"
10+
when: "voot_container is success and voot_container is not change"

‎roles/voot/meta/main.yml‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎roles/voot/tasks/main.yml‎

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,74 @@
11
---
2-
- name: Create directory to keep configfile
2+
- name: "Create directory to keep configfile"
33
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"
88
mode: "0770"
99

10-
- name: Place the serverapplication configfiles
10+
- name: "Place the serverapplication configfiles"
1111
ansible.builtin.template:
1212
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"
1616
mode: "0644"
1717
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"
2222

23-
- name: Create and start the server container
23+
- name: "Create and start the server container"
2424
community.docker.docker_container:
25-
name: vootserver
25+
name: "vootserver"
2626
env:
2727
TZ: "{{ timezone }}"
28-
image: ghcr.io/openconext/openconext-voot/voot:{{ voot_version }}
28+
image: "ghcr.io/openconext/openconext-voot/voot:{{ voot_version }}"
2929
pull: true
3030
restart_policy: "{{ voot_server_restart_policy }}"
3131
restart_retries: "{{ voot_server_restart_retries }}" # Only for restart policy on-failure
32-
state: started
32+
state: "started"
3333
networks:
3434
- name: "loadbalancer"
3535
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"
4545
command: "-Xmx128m --spring.config.location=./"
4646
etc_hosts:
47-
host.docker.internal: host-gateway
47+
host.docker.internal: "host-gateway"
4848
labels:
4949
traefik.http.routers.voot.rule: "Host(`voot.{{ base_domain }}`)"
5050
traefik.http.routers.voot.tls: "true"
5151
traefik.enable: "true"
5252
healthcheck:
5353
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"
6766

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"
6968
ansible.builtin.include_role:
70-
name: manage_provision
69+
name: "manage_provision"
7170
vars:
72-
manage_provision_entity_type: oauth20_rs
71+
manage_provision_entity_type: "oauth20_rs"
7372
manage_provision_oauth_rs_client_id: "{{ voot_manage_provision_oauth_rs_client_id }}"
7473
manage_provision_oauth_rs_name_en: "{{ voot_manage_provision_oauth_rs_name_en }}"
7574
manage_provision_oauth_rs_description_en: "{{ voot_manage_provision_oauth_rs_description_en }}"

0 commit comments

Comments
 (0)