Skip to content

Commit

Permalink
Add provisioning network creation
Browse files Browse the repository at this point in the history
  • Loading branch information
bigjools committed Feb 3, 2017
1 parent 7c55d1e commit 47bde61
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,8 @@
when: inventory_hostname == groups['ironic_api'][0]
tags:
- ironic-images

- include: provisioning_network.yml
when: inventory_hostname == groups['ironic_api'][0]
tags:
- ironic-network
39 changes: 39 additions & 0 deletions tasks/provisioning_network.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# Copyright 2017 Cisco Systems
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# TODO: Make variables for net name, segment ID and tenant ID
- name: Create provisioning network
neutron:
command: create_network
credentials_path: /etc/metacloud/credentials.yml
tenant_id: admin
user_type: admin
net_name: provisioning
provider_network_type: vlan
provider_segmentation_id: 999
provider_physical_network: "{{ admin_network_interface }}"

# TODO: Make vars for name, cidr, pool IPs
- name: Create provisioning subnet
neutron:
command: create_subnet
credentials_path: /etc/metacloud/credentials.yml
user_type: admin
net_name: provisioning
subnet_name: provisioning
cidr: 10.99.0.0/16
enable_dhcp: True
allocation_pool_start: 10.0.1.100
allocation_pool_end: 10.0.1.200

0 comments on commit 47bde61

Please sign in to comment.