Skip to content

Commit

Permalink
Added project arg to network creation
Browse files Browse the repository at this point in the history
In addition, provider_physical_network options have been made to take in
configuration options. The following two should be defined in the site's
default.yml
- physical_network_calico: name of neutron physnet for caliconet network
- physical_network_tunelo: name of neutron physnet for tunelo-calico
  network
  • Loading branch information
Soufiane Jounaid committed Jun 18, 2024
1 parent 0d70c82 commit 1e774ac
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions roles/k3s/tasks/config-neutron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
module_name: os_network
module_args:
auth: "{{ openstack_auth }}"
project: "{{ keystone_admin_project }}"
name: caliconet
provider_network_type: flat
provider_physical_network: calico
provider_physical_network: {{ physical_network_calico }}
shared: yes
state: present
run_once: true
Expand All @@ -17,6 +18,7 @@
module_name: os_subnet
module_args:
auth: "{{ openstack_auth }}"
project: "{{ keystone_admin_project }}"
network_name: caliconet
name: caliconet-subnet
cidr: "{{ k3s_cluster_cidr }}"
Expand All @@ -28,9 +30,10 @@
module_name: os_network
module_args:
auth: "{{ openstack_auth }}"
project: "{{ keystone_admin_project }}"
name: tunelo-calico
provider_network_type: flat
provider_physical_network: tunelo
provider_physical_network: {{ physical_network_tunelo }}
shared: false
become: yes

Expand All @@ -39,6 +42,7 @@
module_name: os_subnet
module_args:
auth: "{{ openstack_auth }}"
project: "{{ keystone_admin_project }}"
network_name: tunelo-calico
name: tunelo-calico-subnet
cidr: "{{ k3s_tunelo_cidr }}"
Expand All @@ -53,6 +57,7 @@
module_name: os_router
module_args:
auth: "{{ openstack_auth }}"
project: "{{ keystone_admin_project }}"
name: sharednet-router
# interfaces:
# - caliconet-subnet
Expand All @@ -71,3 +76,4 @@
neutron_router_id: "{{ calico_router.router.id }}"
when:
- k3s_enable_calico | bool
become: yes

0 comments on commit 1e774ac

Please sign in to comment.