feat: ability to set extra networks for opencloud
needed for ldap outpost Signed-off-by: Bert-Jan Fikse <bert-jan@whatwedo.ch>
This commit is contained in:
parent
e2fae25592
commit
dbcccc090b
3 changed files with 15 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ opencloud_port: 9200
|
||||||
opencloud_admin_password: "admin"
|
opencloud_admin_password: "admin"
|
||||||
opencloud_log_level: "warn"
|
opencloud_log_level: "warn"
|
||||||
opencloud_extra_hosts: []
|
opencloud_extra_hosts: []
|
||||||
|
opencloud_extra_networks: []
|
||||||
|
|
||||||
# Traefik configuration
|
# Traefik configuration
|
||||||
opencloud_traefik_network: "proxy"
|
opencloud_traefik_network: "proxy"
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,12 @@
|
||||||
when: opencloud_drawio_url | length > 0
|
when: opencloud_drawio_url | length > 0
|
||||||
notify: restart opencloud
|
notify: restart opencloud
|
||||||
|
|
||||||
|
- name: Ensure extra networks exist
|
||||||
|
community.docker.docker_network:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
loop: "{{ opencloud_extra_networks }}"
|
||||||
|
|
||||||
- name: Create docker-compose file for opencloud
|
- name: Create docker-compose file for opencloud
|
||||||
template:
|
template:
|
||||||
src: docker-compose.yml.j2
|
src: docker-compose.yml.j2
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,9 @@ services:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
networks:
|
networks:
|
||||||
- {{ opencloud_traefik_network }}
|
- {{ opencloud_traefik_network }}
|
||||||
|
{% for net in opencloud_extra_networks %}
|
||||||
|
- {{ net }}
|
||||||
|
{% endfor %}
|
||||||
{% if opencloud_extra_hosts is defined and opencloud_extra_hosts | length > 0 %}
|
{% if opencloud_extra_hosts is defined and opencloud_extra_hosts | length > 0 %}
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
{% for host in opencloud_extra_hosts %}
|
{% for host in opencloud_extra_hosts %}
|
||||||
|
|
@ -136,3 +139,7 @@ services:
|
||||||
networks:
|
networks:
|
||||||
{{ opencloud_traefik_network }}:
|
{{ opencloud_traefik_network }}:
|
||||||
external: true
|
external: true
|
||||||
|
{% for net in opencloud_extra_networks %}
|
||||||
|
{{ net }}:
|
||||||
|
external: true
|
||||||
|
{% endfor %}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue