Adding support for future network configuration systems

Added a basic template that can be parsed by glean or the
future version of cloud-init, largely to allow a user to deploy
a node without cloud-init.
This commit is contained in:
Julia Kreger 2015-04-20 15:42:33 -04:00
parent f5bf4730e4
commit 05063d79dc
2 changed files with 39 additions and 0 deletions

View File

@ -34,6 +34,10 @@
local_action: template src=openstack_meta_data.json.j2 dest={{ variable_configdrive_location.stdout }}/{{item.split(',')[9]}}/openstack/latest/meta_data.json local_action: template src=openstack_meta_data.json.j2 dest={{ variable_configdrive_location.stdout }}/{{item.split(',')[9]}}/openstack/latest/meta_data.json
with_lines: with_lines:
- cat {{ baremetal_csv_file }} - cat {{ baremetal_csv_file }}
- name: "Place network info template in each openstack/latest folder"
local_action: template src=network_info.json.j2 dest={{ variable_configdrive_location.stdout }}/{{item.split(',')[9]}}/openstack/latest/network_info.json
with_lines:
- cat {{ baremetal_csv_file }}
- name: "Make Metadata folder - /openstack/latest" - name: "Make Metadata folder - /openstack/latest"
local_action: file state=directory name={{ variable_configdrive_location.stdout }}/{{item.split(',')[9]}}/openstack/content/ local_action: file state=directory name={{ variable_configdrive_location.stdout }}/{{item.split(',')[9]}}/openstack/content/
with_lines: with_lines:

View File

@ -0,0 +1,35 @@
{
"links": [
{
"id": "{{node_default_network_interface}}",
"type": "phy",
"ethernet_mac_address": "{{item.split(',')[0]}}",
"mtu":1500
}
],
"networks": [
{
"id": "publicnet-ipv",
"type": "ipv4",
"link": "{{ node_default_network_interface }}",
"ip_address": "{{item.split(',')[11]}}",
"netmask": "{{ipv4_subnet_mask}}",
"dns_nameservers": [
"{{ipv4_nameserver}}"
],
"routes": [
{
"network": "0.0.0.0",
"netmask": "0.0.0.0",
"gateway": "{{ipv4_gateway}}"
}
]
}
],
"services": [
{
"type": "dns",
"address": "{{ipv4_nameserver}}"
}
]
}