Ansible repository with playbooks to manage azure objects
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

39 lignes
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. }