aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/build_yardstick_image.yml
diff options
context:
space:
mode:
authorAce Lee <liyin11@huawei.com>2017-12-04 09:07:14 +0000
committerAce Lee <liyin11@huawei.com>2017-12-28 02:42:12 +0000
commitff4ceec2efd42fb1573e4faf4fe1840121e99715 (patch)
tree6467e6b719eb0402941b0146d4a6090d9960cb70 /ansible/build_yardstick_image.yml
parent363185dfe9153a67892be8544fb4b5bf8709fbbc (diff)
ansible image build improvement
JIRA: YARDSTICK-879 Add some image build vars Add automatic image build of nsb yardstick_image: ansible-playbook -e img_property="normal" -vvv -i inventory.ini build_yardstick_image.yml nsb_image_build: ansible-playbook -e img_property="nsb" -vvv -i inventory.ini build_yardstick_image.yml prepare for yardstick image uploading Change-Id: I9fdf30084511ca9a008df3b53887b06273bbd549 Signed-off-by: Ace Lee <liyin11@huawei.com>
Diffstat (limited to 'ansible/build_yardstick_image.yml')
-rw-r--r--ansible/build_yardstick_image.yml16
1 files changed, 13 insertions, 3 deletions
diff --git a/ansible/build_yardstick_image.yml b/ansible/build_yardstick_image.yml
index 45ef94e98..7f709873e 100644
--- a/ansible/build_yardstick_image.yml
+++ b/ansible/build_yardstick_image.yml
@@ -41,7 +41,12 @@
- package: name=parted state=present
- set_fact:
- imgfile: "{{ workspace }}/yardstick-image.img"
+ imgfile: "{{ normal_image_file }}"
+ when: img_property == "normal"
+
+ - set_fact:
+ imgfile: "{{ nsb_image_file }}"
+ when: img_property == "nsb"
- set_fact:
mountdir: "{{ lookup('env', 'mountdir')|default('/mnt/yardstick', true) }}"
@@ -197,8 +202,13 @@
nameserver_ip: "{{ ansible_dns.nameservers[0] }}"
image_type: vm
-- name: include {{ img_modify_playbook }}
- include: "{{ img_modify_playbook }}"
+- name: include ubuntu_server_cloudimg_modify.yml
+ include: ubuntu_server_cloudimg_modify.yml
+ when: img_property == "normal"
+
+- name: include ubuntu_server_cloudimg_modify_samplevnfs.yml
+ include: ubuntu_server_cloudimg_modify_samplevnfs.yml
+ when: img_property == "nsb"
- hosts: localhost
tasks: