Skip to content

Commit cc1b176

Browse files
committed
readonly binds
1 parent edec147 commit cc1b176

1 file changed

Lines changed: 31 additions & 26 deletions

File tree

roles/manage/tasks/main.yml

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@
4040
- name: Place the serverapplication configfiles
4141
ansible.builtin.template:
4242
src: "{{ item }}.j2"
43-
dest: /opt/openconext/manage/{{ item }}
44-
owner: root
45-
group: root
43+
dest: "/opt/openconext/manage/{{ item }}"
44+
owner: "root"
45+
group: "root"
4646
mode: "0644"
4747
with_items:
48-
- application.yml
49-
- logback.xml
50-
- manage-api-users.yml
48+
- "application.yml"
49+
- "logback.xml"
50+
- "manage-api-users.yml"
5151
notify: restart manageserver
5252

5353
- name: Place old __cacert_entrypoint.sh script
@@ -62,8 +62,8 @@
6262
ansible.builtin.template:
6363
src: "metadata_configuration/{{ item }}.schema.json.j2"
6464
dest: "/opt/openconext/manage/metadata_configuration/{{ item }}.schema.json"
65-
owner: root
66-
group: root
65+
owner: "root"
66+
group: "root"
6767
mode: "0640"
6868
with_items:
6969
- "{{ manage_tabs_enabled }}"
@@ -90,17 +90,17 @@
9090
group: root
9191
mode: "0640"
9292
with_items:
93-
- allowed_attributes.json
94-
- extra_saml_attributes.json
93+
- "allowed_attributes.json"
94+
- "extra_saml_attributes.json"
9595
notify:
9696
- "restart manageserver"
9797

9898
- name: Add the mongodb and mariadb docker network to the list of networks when MongoDB runs in Docker
9999
ansible.builtin.set_fact:
100100
manage_docker_networks:
101-
- name: loadbalancer
102-
- name: openconext_mongodb
103-
- name: openconext_mariadb
101+
- name: "loadbalancer"
102+
- name: "openconext_mongodb"
103+
- name: "openconext_mariadb"
104104
when: mongodb_in_docker | default(false) | bool
105105

106106
- name: Create and start the server container
@@ -114,19 +114,22 @@
114114
state: started
115115
networks: "{{ manage_docker_networks }}"
116116
mounts:
117-
- source: /opt/openconext/manage/
118-
target: /config/
119-
type: bind
120-
- source: /opt/openconext/manage/mongoca.pem
121-
target: /certificates/mongoca.crt
122-
type: bind
123-
- source: /opt/openconext/manage/__cacert_entrypoint.sh
124-
target: /__cacert_entrypoint.sh
125-
type: bind
126-
- source: /opt/openconext/manage/stepup_config.json
127-
target: /stepup_config.json
128-
type: bind
129-
117+
- source: "/opt/openconext/manage/"
118+
target: "/config/"
119+
type: "bind"
120+
read_only: true
121+
- source: "/opt/openconext/manage/mongoca.pem"
122+
target: "/certificates/mongoca.crt"
123+
type: "bind"
124+
read_only: true
125+
- source: "/opt/openconext/manage/__cacert_entrypoint.sh"
126+
target: "/__cacert_entrypoint.sh"
127+
type: "bind"
128+
read_only: true
129+
- source: "/opt/openconext/manage/stepup_config.json"
130+
target: "/stepup_config.json"
131+
type: "bind"
132+
read_only: true
130133
command: "java -jar /app.jar -Xmx512m --spring.config.location=./config/"
131134
etc_hosts:
132135
host.docker.internal: host-gateway
@@ -183,6 +186,8 @@
183186
- source: /etc/localtime
184187
target: /etc/localtime
185188
type: bind
189+
read_only: true
186190
- source: /opt/openconext/common/favicon.ico
187191
target: /var/www/favicon.ico
188192
type: bind
193+
read_only: true

0 commit comments

Comments
 (0)