supernode 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. local_node: "{{supernodes[1]}}"
  2. supernode_mesh_mac: "{{local_node.mesh_mac}}"
  3. supernode_mesh_ipv4: "{{local_node.mesh_ip_v4}}"
  4. supernode_bat_macaddress: "{{local_node.bat_mac}}"
  5. supernode_mesh_ipv6: "{{local_node.mesh_ip_v6}}"
  6. supernode_local_ip: "{{local_node.public_ip|default(ansible_default_ipv4.address)}}"
  7. supernode_public_interface: "{{local_node.public_interface|default(ansible_default_ipv4.interface)}}"
  8. supernode_dhcp_range_start: "{{local_node.dhcp_range_start}}"
  9. supernode_dhcp_range_end: "{{local_node.dhcp_range_end}}"
  10. supernode_mesh_backbones:
  11. - name: "{{supernodes[0].name}}"
  12. remote_ip: "{{supernodes[0].public_ip|ipaddr('address')}}"
  13. mesh_ip: "{{supernodes[0].mesh_ip_v4|ipaddr('address')}}"
  14. address_v6: "{{supernodes[0].mesh_ip_v6|ipaddr('address')}}"
  15. local_ip: "{{supernode_local_ip|ipaddr('address')}}"
  16. interface: "{{supernode_public_interface}}"
  17. - name: "{{supernodes[2].name}}"
  18. remote_ip: "{{supernodes[2].public_ip|ipaddr('address')}}"
  19. mesh_ip: "{{supernodes[2].mesh_ip_v4|ipaddr('address')}}"
  20. address_v6: "{{supernodes[2].mesh_ip_v6|ipaddr('address')}}"
  21. local_ip: "{{supernode_local_ip|ipaddr('address')}}"
  22. interface: "{{supernode_public_interface}}"
  23. supernode_other_nameserver: "{{supernode_mesh_backbones|map(attribute='mesh_ip')|map('ipaddr','address')|join(', ')}}"
  24. supernode_other_ntp_server: "{{supernode_mesh_backbones|map(attribute='mesh_ip')|map('ipaddr','address')|join(', ')}}"
  25. supernode_interfaces:
  26. - name: eth0
  27. auto: true
  28. proto: inet
  29. type: dhcp
  30. - name: eth1
  31. auto: true
  32. proto: inet
  33. type: static
  34. config:
  35. - key: address
  36. value: "{{supernode_local_ip|ipaddr('address')}}"
  37. - key: netmask
  38. value: "{{supernode_local_ip|ipaddr('netmask')}}"
  39. - key: broadcast
  40. value: "{{supernode_local_ip|ipaddr('broadcast')}}"