Skip to content

Commit

Permalink
vlan4000 will be created by metal-core
Browse files Browse the repository at this point in the history
  • Loading branch information
robertvolkmann committed Jul 18, 2024
1 parent e5d6383 commit c523ea3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
15 changes: 15 additions & 0 deletions deploy_partition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,18 @@
- lookup('metal', 'search', 'switch', api_url=metal_partition_metal_api_protocol+'://'+metal_partition_metal_api_addr+':'+metal_partition_metal_api_port|string+metal_partition_metal_api_basepath, api_hmac=metal_partition_metal_api_hmac_edit_key) | length == 2
- lookup('metal', 'search', 'switch', api_url=metal_partition_metal_api_protocol+'://'+metal_partition_metal_api_addr+':'+metal_partition_metal_api_port|string+metal_partition_metal_api_basepath, api_hmac=metal_partition_metal_api_hmac_edit_key)[0]["last_sync"] != None
- lookup('metal', 'search', 'switch', api_url=metal_partition_metal_api_protocol+'://'+metal_partition_metal_api_addr+':'+metal_partition_metal_api_port|string+metal_partition_metal_api_basepath, api_hmac=metal_partition_metal_api_hmac_edit_key)[1]["last_sync"] != None

- name: Ensure return path to PXE network is present
hosts: leaves:&cumulus
gather_facts: no
tasks:
- name: check for static route in mgmt vrf
command: ip r s vrf mgmt
register: route_check
changed_when: false

- name: ensure that static route for return path to pxe network is present
command: "ip r a 10.0.1.0/24 vrf mgmt via {{ dhcp_server_ip }} dev vlan4000"
when:
- '"10.0.1.0/24" not in route_check.stdout'
- dhcp_server_ip is defined
11 changes: 0 additions & 11 deletions roles/cumulus/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@
out_interface: eth0
jump: MASQUERADE

- name: check for static route in mgmt vrf
command: ip r s vrf mgmt
register: route_check
changed_when: false

- name: ensure that static route for return path to pxe network is present
command: "ip r a 10.0.1.0/24 vrf mgmt via {{ dhcp_server_ip }} dev vlan4000"
when:
- '"10.0.1.0/24" not in route_check.stdout'
- dhcp_server_ip is defined

- name: create bridgemac.json
copy:
src: bridgemac.json
Expand Down

0 comments on commit c523ea3

Please sign in to comment.