forked from CiscoDevNet/sdwan-devops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-vmware.yml
83 lines (80 loc) · 2.58 KB
/
build-vmware.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
- name: Build Control Plane VMs with Terraform
hosts: localhost
connection: local
tags:
- terraform
- control
any_errors_fatal: true
gather_facts: no
tasks:
- name: Generate Terraform variables file for control plane
template:
src: templates/control_tfvars.j2
dest: terraform-sdwan/vmware/control.tfvars
tags:
- plan
- name: Terraform Plan
terraform:
project_path: 'terraform-sdwan/vmware'
state: planned
plan_file: control.tfplan
workspace: control
variables_file: control.tfvars
variables:
datacenter: "{{ datacenter }}"
cluster: "{{ cluster }}"
resource_pool: "{{ resource_pool }}"
datastore: "{{ datastore }}"
iso_datastore: "{{ iso_datastore }}"
iso_path: "{{ iso_path }}"
vmanage_template: "{{ vmanage_template }}"
vbond_template: "{{ vbond_template }}"
vsmart_template: "{{ vsmart_template }}"
vedge_template: "{{ vedge_template }}"
force_init: yes
# backend_config:
# region: "us-east-1"
# bucket: "terraform-state-sdwan-jenkins"
# key: "global/s3/terraform.tfstate"
# dynamodb_table: "terraform-locks-sdwan-jenkins"
# encrypt: 1
tags: plan
- name: Terraform Apply
terraform:
project_path: 'terraform-sdwan/vmware'
state: present
plan_file: control.tfplan
workspace: control
variables_file: control.tfvars
tags: apply
# variables_file: chris.yaml
# variables:
# vmanage_device_list:
# - name: cpn-rtp-vmanage1
# networks:
# - cpn-rtp-colab1
# - vpn512
# ipv4_address: "192.133.179.11/24"
# ipv4_gateway: "192.133.179.1"
# vsmart_device_list:
# - name: cpn-rtp-vsmart1
# networks:
# - cpn-rtp-colab1
# - vpn512
# ipv4_address: "192.133.179.12/24"
# ipv4_gateway: "192.133.179.1"
# vbond_device_list:
# - name: cpn-rtp-bond1
# networks:
# - vpn512
# - cpn-rtp-colab1
# ipv4_address: "192.133.179.14/24"
# ipv4_gateway: "192.133.179.1"
# vedge_device_list:
# - name: cpn-rtp-vedge1
# networks:
# - vpn512
# - cpn-rtp-colab1
# - site10
# ipv4_address: "192.133.179.16/24"
# ipv4_gateway: "192.133.179.1"