-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1.0-playbook_deploy_ppdm_S3.yaml
62 lines (62 loc) · 1.79 KB
/
1.0-playbook_deploy_ppdm_S3.yaml
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
- name: Deploy PPDM
hosts: localhost
gather_facts: no
connection: local
vars_files:
- ./vars/main.yml
vars:
ovf: dellemc-ppdm-sw-19.17.0-10.ova
datacenter: democenter
datastore: nfs-datastore
disk_provisioning: thin
networks: '{"VM Network": "prod vm network"}'
ip0: '192.168.1.53'
gateway: '192.168.1.1'
netmask0: '255.255.255.0'
ip0_ipv6: ''
gateway_ipv6: ''
netmask0_ipv6: ''
DNS: '192.168.1.2'
fqdn: 'ppdm-2.demo.local'
vm_name: 'ppdm-2'
s3_bucket: dps-products
s3_host: http://ansible.demo.local:9000
access_key: minioadmin
secret_key: Password123!
s3_container: powerprotect
release: 19.17
local_directory: /tmp
tasks:
- name: load_image_from_s3
amazon.aws.aws_s3:
bucket: "{{ s3_bucket}}"
object: "{{ s3_container }}/{{ release }}/{{ ovf }}"
dest: "{{ local_directory }}/{{ ovf }}"
mode: get
encrypt: false
endpoint_url: "{{ s3_host }}"
access_key: "{{ access_key }}"
secret_key: "{{ secret_key }}"
- name: Deploy ovf
vmware_deploy_ovf:
allow_duplicates: no
datacenter: '{{ datacenter }}'
datastore: '{{ datastore }}'
ovf: '{{ local_directory }}/{{ ovf }}'
wait_for_ip_address: true
networks: '{{ networks }}'
name: '{{ vm_name }}'
properties:
vami.ip0.brs: '{{ ip0 }}'
vami.gateway.brs: '{{ gateway }}'
vami.netmask0.brs: '{{ netmask0 }}'
vami.ip0.ipv6.brs: '{{ ip0_ipv6 }}'
vami.gateway.ipv6.brs: '{{ gateway_ipv6 }}'
vami.netmask0.ipv6.brs: '{{ netmask0_ipv6 }}'
vami.DNS.brs: '{{ DNS }}'
vami.fqdn.brs: '{{ fqdn }}'
delegate_to: localhost
register: result
- name: display_result
debug:
msg: "{{ result }}"