Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy-bm-hypervisor.yml add ipv6 support #39

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions playbooks/infra/deploy-bm-hypervisor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,15 @@
type: bridge
conn_name: bridge-baremetal
method4: manual
method6: disabled
method6: "{{ 'manual' if (net_config | from_yaml)['ip6'] is defined else 'disabled' }}"
state: present
stp: false
ifname: baremetal
autoconnect: true
ip4: "{{ ipaddr_mask | ansible.utils.ipaddr('address/prefix') }}"
gw4: "{{ (net_config | from_yaml)['gw'] }}"
ip6: "{{ (net_config | from_yaml)['ip6'] | default(omit) }}"
gw6: "{{ (net_config | from_yaml)['gw6'] | default(omit) }}"
dns4:
- "{{ (net_config | from_yaml)['dns'] }}"

Expand Down Expand Up @@ -227,13 +229,14 @@
community.general.nmcli:
type: bridge
conn_name: "{{ item.key }}"
method4: manual
method6: disabled
method4: "{{ 'manual' if item.value.ipv4 is defined else 'disabled' }}"
method6: "{{ 'manual' if item.value.ipv6 is defined else 'disabled' }}"
state: present
stp: false
ifname: "{{ item.key }}"
autoconnect: true
ip4: "{{ item.value.ipv4 }}"
ip4: "{{ item.value.ipv4 | default(omit) }}"
ip6: "{{ item.value.ipv6 | default(omit) }}"

- name: Set up network connection bridge-slave for secondary connection
when: item.value.vlan is not defined
Expand Down