-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdeclarative_demo.yaml
82 lines (70 loc) · 2.33 KB
/
declarative_demo.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
- name: Push BIG-IP
hosts: bigip
gather_facts: false
tasks:
# Set Var for curent DO file name
- name: Retrieve DO Install Version
find:
paths: ./files
patterns: "f5-decl*.rpm"
register: dorpm
delegate_to: localhost
# Set Var for curent AS3 file name
- name: Retrieve AS3 Install Version
find:
paths: ./files
patterns: "f5-appsvcs*.rpm"
register: as3rpm
delegate_to: localhost
- name: Install DO
bigip_iapplx_package:
provider: "{{ hostvars[inventory_hostname]['provider'] }}"
package: "{{ dorpm.files[0].path }}"
delegate_to: localhost
- pause:
seconds: 5
- name: Install AS3
bigip_iapplx_package:
provider: "{{ hostvars[inventory_hostname]['provider'] }}"
package: "{{ as3rpm.files[0].path }}"
delegate_to: localhost
- pause:
seconds: 5
- name: Push DO
uri:
url: "https://{{ hostvars[inventory_hostname]['provider']['server'] }}:{{ hostvars[inventory_hostname]['provider']['server_port'] }}/mgmt/shared/declarative-onboarding"
method: POST
user: admin
password: "{{ hostvars[inventory_hostname]['provider']['password'] }}"
body: "{{ lookup('file','host_vars/' + inventory_hostname + '/do.json') }}"
status_code: 202
timeout: 300
body_format: json
validate_certs: no
delegate_to: localhost
- pause:
seconds: 5
- name: Push AS3 (LTM)
uri:
url: "https://{{ hostvars[inventory_hostname]['provider']['server'] }}:{{ hostvars[inventory_hostname]['provider']['server_port'] }}/mgmt/shared/appsvcs/declare"
method: POST
user: admin
password: "{{ hostvars[inventory_hostname]['provider']['password'] }}"
body: "{{ lookup('file','host_vars/' + inventory_hostname + '/apps.json') }}"
status_code: 200
timeout: 300
body_format: json
validate_certs: no
delegate_to: localhost
- name: Push AS3 (GSLB)
uri:
url: "https://{{ hostvars[inventory_hostname]['provider']['server'] }}/mgmt/shared/appsvcs/declare"
method: POST
user: admin
password: "{{ hostvars[inventory_hostname]['provider']['password'] }}"
body: "{{ lookup('file','host_vars/' + inventory_hostname + '/gslb.json') }}"
status_code: 200
timeout: 300
body_format: json
validate_certs: no
delegate_to: localhost