Ansible repository with playbooks to manage azure objects
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 regels
1.1 KiB

  1. {
  2. "location": "{{ rt.location }}",
  3. "properties": {
  4. "disableBgpRoutePropagation": "{{ rt.disableBgpRoutePropagation | default(true) }}",
  5. "routes": [
  6. {% for udr in routes | default([]) %}
  7. {
  8. "name": "{{ udr.name }}",
  9. "properties": {
  10. "addressPrefix": "{{ udr.address_prefix }}",
  11. {% if udr.hasBgpOverride is defined %}
  12. "hasBgpOverride": {{ udr.hasBgpOverride }},
  13. {% endif %}
  14. {% if 'ppliance' in udr.next_hop_type %}
  15. "nextHopType": "VirtualAppliance",
  16. {% elif 'nternet' in udr.next_hop_type %}
  17. "nextHopType": "Internet",
  18. {% elif 'etwork' in udr.next_hop_type %}
  19. "nextHopType": "VirtualNetworkGateway",
  20. {% elif 'ocal' in udr.next_hop_type %}
  21. "nextHopType": "VnetLocal",
  22. {% else %}
  23. "nextHopType": "None",
  24. {% endif %}
  25. {% if udr.next_hop_type is undefined or 'ppliance' in udr.next_hop_type %}
  26. "nextHopIpAddress": "{{ udr.next_hop_ip_address }}"
  27. {% endif %}
  28. }
  29. },
  30. {% endfor %}
  31. ]
  32. },
  33. "tags": {
  34. {% for key, value in (rt.tags | default({})).items() %}
  35. "{{ key }}": "{{ value }}",
  36. {% endfor %}
  37. }
  38. }