Permalink
Cannot retrieve contributors at this time
Fetching contributors…
| --- | |
| # Note: this is necessary when being called from | |
| # network-relation-changed, not from db-relation-joined. | |
| # Read data from flannel config | |
| - name: Read Flannel Subnet | |
| shell: cat /run/flannel/subnet.env | grep FLANNEL_SUBNET | cut -f2 -d"=" | |
| register: flannel_subnet | |
| - name: Read Flannel MTU | |
| shell: cat /run/flannel/subnet.env | grep FLANNEL_MTU | cut -f2 -d"=" | |
| register: flannel_mtu | |
| - name: Read network relation | |
| shell: "{{ charm_dir }}/scripts/parse_relation.py" | |
| register: network_id | |
| - set_fact: | |
| flannel_mtu: "{{ flannel_mtu.stdout }}" | |
| flannel_subnet: "{{ flannel_subnet.stdout }}" | |
| scoped_network: "{{ network_id.stdout | default('') }}" | |
| - name: Send Data to Docker Host for bridge configuration | |
| shell: relation-set -r {{ scoped_network }} flannel-subnet={{ flannel_subnet }} flannel-mtu={{ flannel_mtu }} overlay_type=udp | |
| when: scoped_network != "" |