Merge "Add VNF descriptor for vIMS testcase"
[yardstick.git] / ansible / infra_deploy.yml
1 # Copyright (c) 2018 Intel Corporation.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 ---
15 - hosts: jumphost
16   vars:
17     rs_file: "{{ RS_FILE }}"
18     clean_up: "{{ CLEAN_UP | default(False) }}" # If True will be delete all VMs, networks, disk images
19
20   tasks:
21   - set_fact:
22       proxy_host: "{{ lookup('env', 'http_proxy') | urlsplit('hostname') }}"
23       proxy_proto: "{{ lookup('env', 'http_proxy') | urlsplit('scheme') }}"
24       proxy_port: "{{ lookup('env', 'http_proxy') | urlsplit('port') }}"
25
26   - set_fact:
27       proxy_host_ip: "{{ lookup('dig', proxy_host) }}"
28
29   roles:
30     - infra_install_dependencies
31     - infra_destroy_previous_configuration
32     - infra_check_requirements
33     - infra_create_network
34     - infra_create_vms
35     - infra_prepare_vms
36
37 - hosts: deploy,regular,yardstickG
38   gather_facts: no
39   become: yes
40
41   roles:
42   - infra_rampup_stack_nodes
43
44
45 - hosts: deploy
46   become: yes
47   environment: "{{ proxy_env }}"
48
49   roles:
50   - infra_deploy_openstack