diff options
author | Manuel Buil <mbuil@suse.com> | 2018-08-09 16:52:46 +0200 |
---|---|---|
committer | Manuel Buil <mbuil@suse.com> | 2018-10-17 17:18:51 +0200 |
commit | c380a85cb660d07da714ad3adf43439ad7938270 (patch) | |
tree | 248470a0975c2c2d330082bf8e8c032a2e6f12ad /xci/playbooks/roles/create-nodes/defaults/main.yml | |
parent | b9b00f336f20bad8bc58b325172ebf9c71c83b6a (diff) |
[Baremetal] Add baremetal support to create-nodes
Information about baremetal servers is collected for ironic to do
the provisioning. Two main things are done:
1 - baremetalhoststojson.yml fills the json config file fed to ironic
so that it knows how to boot the blades. In the baremetal case, the
create_vm.yml playbook will only create opnfv vm. The variable
vms_to_create holds that information. The variable baremetal_nodes
specifies the physical nodes (empty when non baremetal deployments)
2 - For PXE to work, we create a file called baremetalstaticips that
has the mapping between mac address from servers and its ip. That file
is moved into the dnsmasq config directory
Change-Id: I0e788db1deb50769c183b71524a68ac0b925f8aa
Signed-off-by: Manuel Buil <mbuil@suse.com>
Diffstat (limited to 'xci/playbooks/roles/create-nodes/defaults/main.yml')
-rw-r--r-- | xci/playbooks/roles/create-nodes/defaults/main.yml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xci/playbooks/roles/create-nodes/defaults/main.yml b/xci/playbooks/roles/create-nodes/defaults/main.yml index b03f1386..02a429cf 100644 --- a/xci/playbooks/roles/create-nodes/defaults/main.yml +++ b/xci/playbooks/roles/create-nodes/defaults/main.yml @@ -4,10 +4,10 @@ baremetal_json_file: '/tmp/baremetal.json' # We collect these parameters from the pdf vm_nic: "virtio" -vm_groups: {} -vm_default_groups: "{{ lookup('env', 'DEFAULT_HOST_GROUPS').split() | default(['baremetal'], true) }}" vm_disk_cache: unsafe node_names: "{{ lookup('env', 'NODE_NAMES').split() }}" +node_groups: {} +node_default_groups: "{{ lookup('env', 'DEFAULT_HOST_GROUPS').split() | default(['baremetal'], true) }}" network_bridge_admin: 'br-admin' network_bridge_mgmt: 'br-mgmt' @@ -27,4 +27,6 @@ vm_libvirt_uri: "{{ lookup('env', 'LIBVIRT_CONNECT_URI') | default('qemu:///syst opnfv_image_path: "/var/lib/libvirt/images" +vms_to_create: "{{ (baremetal | bool) | ternary([opnfv_vm_pdf], [opnfv_vm_pdf] + nodes) }}" +baremetal_nodes: "{{ (baremetal | bool) | ternary(nodes, omit) }}" libvirt_networks: "{{ (baremetal | bool) | ternary([vm_network_admin,vm_network_mgmt],[vm_network_admin]) }}" |