Browse Source

add listen ip and fix network lookup

main
Felix Kronlage-Dammers 2 months ago
parent
commit
9d6502442c
  1. 1
      defaults/main.yml
  2. 8
      tasks/main.yml

1
defaults/main.yml

@ -2,6 +2,7 @@
goneb_directory: /srv/goneb
goneb_docker_network: goneb
goneb_listen_ip: "127.0.0.1"
goneb_port: 4050
goneb_base_url: http://example.net
goneb_userid: "@foobar:matrix.org"

8
tasks/main.yml

@ -44,7 +44,7 @@
name: goneb
networks:
- name: "{{ goneb_docker_network }}"
published_ports: "{{ goneb_port }}:{{ goneb_port }}"
published_ports: "{{ goneb_listen_ip }}:{{ goneb_port }}:{{ goneb_port }}"
state: started
restart_policy: always
volumes:
@ -55,6 +55,10 @@
CONFIG_FILE: /data/config.yaml
register: _goneb_container
- name: goneb | lookup container IP
command: docker inspect --format '{''{ .NetworkSettings.Networks.{{ goneb_docker_network }}.IPAddress}''}' goneb
register: _goneb_container_ip
- name: goneb | return container IP
set_fact:
goneb_internal_ip: "{{ _goneb_container.container.NetworkSettings.Networks.goneb.IPAddress }}"
goneb_internal_ip: "{{ _goneb_container_ip.stdout }}"

Loading…
Cancel
Save