From c380a85cb660d07da714ad3adf43439ad7938270 Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Thu, 9 Aug 2018 16:52:46 +0200 Subject: [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 --- xci/playbooks/roles/create-nodes/tasks/main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'xci/playbooks/roles/create-nodes/tasks/main.yml') diff --git a/xci/playbooks/roles/create-nodes/tasks/main.yml b/xci/playbooks/roles/create-nodes/tasks/main.yml index 18bc9871..0e51b411 100644 --- a/xci/playbooks/roles/create-nodes/tasks/main.yml +++ b/xci/playbooks/roles/create-nodes/tasks/main.yml @@ -20,10 +20,13 @@ # First we create the opnfv_vm - include_tasks: create_vm.yml - with_indexed_items: "{{ [opnfv_vm_pdf] + nodes }}" + with_indexed_items: "{{ vms_to_create }}" + +- include_tasks: barematalhoststojson.yml + with_items: "{{ baremetal_nodes }}" - name: Start the opnfv vm - virt: + virt: command: start name: opnfv @@ -38,8 +41,6 @@ dest: "{{ baremetal_json_file }}" content: "{{ nodes_json_data | to_nice_json }}" -- debug: var=nodes_json_data - - name: > "Set file permissions such that the baremetal data file can be read by the user executing Ansible" -- cgit 1.2.3-korg