From 3c6d272574e63d865bde4e41674432c3973d9e0e Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Tue, 2 Feb 2016 19:39:47 +0100 Subject: [PATCH] Allow to define the number of test vms to be created To test features that need several VMs to be created, enable this setting that reuses the NODECOUNT setting already present on the test script. Change-Id: I43d1625f277b1c073441b70e47ba95e121dd116a --- playbooks/roles/bifrost-create-vm-nodes/README.md | 4 ++++ playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml | 1 + playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml | 1 + 3 files changed, 6 insertions(+) diff --git a/playbooks/roles/bifrost-create-vm-nodes/README.md b/playbooks/roles/bifrost-create-vm-nodes/README.md index 55dd7c04e..27260711f 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/README.md +++ b/playbooks/roles/bifrost-create-vm-nodes/README.md @@ -24,6 +24,10 @@ test_vm_memory_size: Tunable setting to allow a user to define a specific between test runs, you may need to undefine the test virtual machine(s) that were previously created. +test_vm_num_nodes: Tunable setting to allow a user to define the number of + test VMs that will be created. They will all be created + with same settings. + Dependencies ------------ diff --git a/playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml b/playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml index 88891df7f..c20a283c6 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml +++ b/playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml @@ -2,3 +2,4 @@ # defaults file for bifrost-create-vm-nodes baremetal_csv_file: "/tmp/baremetal.csv" test_vm_memory_size: "3072" +test_vm_num_nodes: "1" diff --git a/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml b/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml index c73574aa5..41c1ee435 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml +++ b/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml @@ -56,6 +56,7 @@ environment: NODEOUTPUT: "{{baremetal_csv_file}}" VM_RAM: "{{ test_vm_memory_size }}" + NODECOUNT: "{{ test_vm_num_nodes }}" register: task_create_vm_nodes ignore_errors: yes delegate_to: localhost