-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure_apigateway_settings.yaml
executable file
·262 lines (234 loc) · 11.1 KB
/
configure_apigateway_settings.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
---
################################################################
## Playbook Preps
################################################################
- import_playbook: common_playbook_preps_filter_unreachable.yaml
vars:
filter_unreachable_hosts_pattern: apigateway
filter_unreachable_result_host_group: apigateway_filtered_hosts
- import_playbook: common_playbook_preps_load_vars.yaml
vars:
webmethods_inventory_hosts_pattern: apigateway_filtered_hosts
################################################################
## waiting for service running via port checking
################################################################
- name: Check the ports to ensure valid state
hosts: apigateway_filtered_hosts
become: true
tasks:
- include_role:
name: check-remote-ports
vars:
rvar_validation_host: "{{ vars_validation_host }}"
rvar_validation_ports: "{{ vars_validation_ports }}"
rvar_validation_ports_timeout: "{{ vars_validation_ports_timeout }}"
rvar_async_timeout: "{{ common_async_timeout }}"
rvar_async_poll: "{{ common_async_poll }}"
rvar_async_retries: "{{ common_async_retries }}"
rvar_async_delay: "{{ common_async_delay }}"
################################################################
## set configs via REST APIs
################################################################
- name: Setting Misc Apigateway Server configs via Apigateway Management REST APIs - runs only ONCE, against one of the server
hosts: apigateway_filtered_hosts
become: true
become_user: "{{ webmethods_user }}"
run_once: true
vars:
apigateway_rest_protocol: "{{ vars_apigateway_rest_protocol }}"
apigateway_rest_host: "{{ vars_apigateway_rest_host }}"
apigateway_rest_port: "{{ vars_apigateway_rest_port }}"
apigateway_rest_no_check_certs: "{{ vars_apigateway_rest_no_check_certs }}"
tasks:
- name: Self Reset Apigateway REST API User password
include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: yes
vars:
configs_action: update-user-password
configs_enabled: "true"
apigateway_rest_login_username: "{{ vars_apigateway_rest_login_username }}"
apigateway_rest_login_password: "{{ vars_apigateway_rest_login_password_old }}"
apigateway_update_user_username: "{{ vars_apigateway_rest_login_username }}"
apigateway_update_user_password: "{{ vars_apigateway_rest_login_password }}"
## this is to make sure we regather the facts and vars etc
## So the roles can get the right new user/pass values
- setup:
tags: always
## re-set the user/password for all the REST calls following this
- name: Set the REST user/password vars with the new password
set_fact:
apigateway_rest_login_username: "{{ vars_apigateway_rest_login_username }}"
apigateway_rest_login_password: "{{ vars_apigateway_rest_login_password }}"
tags: always
## printing the vars that enable/disable the roles
- block:
- debug: var=vars_webmethods_apigateway_usermgt_enabled verbosity=3
- debug: var=vars_webmethods_apigateway_portalgateway_enabled verbosity=3
- debug: var=vars_webmethods_apigateway_archive_imports_enabled verbosity=3
- debug: var=vars_webmethods_apigateway_aliases_enabled verbosity=3
- debug: var=vars_webmethods_apigateway_ports_enabled verbosity=3
- debug: var=vars_webmethods_apigateway_ldap_enabled verbosity=3
- debug: var=vars_webmethods_apigateway_saml_enabled verbosity=3
- debug: var=vars_webmethods_apigateway_loadbalancer_enabled verbosity=3
- debug: var=vars_webmethods_apigateway_promotions_stages_enabled verbosity=3
- debug: var=vars_webmethods_apigateway_extended_settings_enabled verbosity=3
- debug: var=vars_webmethods_apigateway_applications_enabled verbosity=3
- debug: var=vars_webmethods_apigateway_plans_enabled verbosity=3
- debug: var=vars_webmethods_apigateway_packages_enabled verbosity=3
tags: always
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_usermgt_ignore_errors }}"
vars:
configs_action: set-users
configs_enabled: "{{ vars_webmethods_apigateway_usermgt_enabled }}"
apigateway_configparams_rest_usermgt_users: "{{ vars_webmethods_apigateway_usermgt_users }}"
tags:
- configs_users
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_usermgt_ignore_errors }}"
vars:
configs_action: set-groups
configs_enabled: "{{ vars_webmethods_apigateway_usermgt_enabled }}"
apigateway_configparams_rest_usermgt_groups: "{{ vars_webmethods_apigateway_usermgt_groups }}"
tags:
- configs_groups
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_usermgt_ignore_errors }}"
vars:
configs_action: set-accessprofiles
configs_enabled: "{{ vars_webmethods_apigateway_usermgt_enabled }}"
apigateway_configparams_rest_usermgt_accessprofiles: "{{ vars_webmethods_apigateway_usermgt_accessprofiles }}"
tags:
- configs_accessprofiles
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_extended_settings_ignore_errors }}"
vars:
configs_action: set-extended-settings-coregateway
configs_enabled: "{{ vars_webmethods_apigateway_extended_settings_enabled }}"
webmethods_apigateway_extended_settings_coregateway_extended_keys: "{{ vars_webmethods_apigateway_extended_settings_coregateway_extended_keys }}"
tags:
- configs_extended_settings
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_ldap_ignore_errors }}"
vars:
configs_action: set-ldap-settings
configs_enabled: "{{ vars_webmethods_apigateway_ldap_enabled }}"
webmethods_apigateway_ldap_settings: "{{ vars_webmethods_apigateway_ldap_settings }}"
tags:
- configs_ldap_settings
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_loadbalancer_ignore_errors }}"
vars:
configs_action: set-loadbalancer-urls
configs_enabled: "{{ vars_webmethods_apigateway_loadbalancer_enabled }}"
webmethods_apigateway_loadbalancers_http_urls: "{{ vars_webmethods_apigateway_loadbalancers_http_urls }}"
webmethods_apigateway_loadbalancers_https_urls: "{{ vars_webmethods_apigateway_loadbalancers_https_urls }}"
webmethods_apigateway_loadbalancers_websocket_urls: "{{ vars_webmethods_apigateway_loadbalancers_websocket_urls }}"
webmethods_apigateway_loadbalancers_webapp_url: "{{ vars_webmethods_apigateway_loadbalancers_webapp_url }}"
tags:
- configs_loadbalancer_urls
## devportal
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_portalgateway_ignore_errors }}"
vars:
configs_action: set-apiportal-connect
configs_enabled: "{{ vars_webmethods_apigateway_portalgateway_enabled }}"
webmethods_apigateway_portalgateway: "{{ vars_webmethods_apigateway_portalgateway_devportal }}"
tags:
- configs_apiportal_connect
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_promotions_stages_ignore_errors }}"
vars:
configs_action: set-promotion-stages
configs_enabled: "{{ vars_webmethods_apigateway_promotions_stages_enabled }}"
webmethods_apigateway_promotions_stages: "{{ vars_webmethods_apigateway_promotions_stages }}"
tags:
- configs_promotion_stages
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_aliases_ignore_errors }}"
vars:
configs_action: set-aliases
configs_enabled: "{{ vars_webmethods_apigateway_aliases_enabled }}"
rvar_apigateway_aliases: "{{ vars_webmethods_apigateway_aliases }}"
tags:
- configs_aliases
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_archive_imports_ignore_errors }}"
vars:
configs_action: import-archive-from-s3
configs_enabled: "{{ vars_webmethods_apigateway_archive_imports_enabled }}"
rvar_apigateway_archive_imports_s3_downloads: "{{ vars_webmethods_apigateway_archive_imports_from_s3 }}"
tags:
- configs_archives
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_applications_ignore_errors }}"
vars:
configs_action: set-applications
configs_enabled: "{{ vars_webmethods_apigateway_applications_enabled }}"
rvar_apigateway_applications: "{{ vars_webmethods_apigateway_applications }}"
tags:
- configs_applications
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_plans_ignore_errors }}"
vars:
configs_action: set-plans
configs_enabled: "{{ vars_webmethods_apigateway_plans_enabled }}"
rvar_apigateway_plans: "{{ vars_webmethods_apigateway_plans }}"
tags:
- configs_plans
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_packages_ignore_errors }}"
vars:
configs_action: set-packages
configs_enabled: "{{ vars_webmethods_apigateway_packages_enabled }}"
rvar_apigateway_packages: "{{ vars_webmethods_apigateway_packages }}"
tags:
- configs_packages
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_apis_publish_groups_ignore_errors }}"
vars:
configs_action: publish-apis-groups
configs_enabled: "{{ vars_webmethods_apigateway_apis_publish_groups_enabled }}"
rvar_apigateway_apis_publish_groups: "{{ vars_webmethods_apigateway_apis_publish_groups }}"
tags:
- publish_apis
- include_role:
name: apigateway-rest-configurator
apply:
ignore_errors: "{{ vars_webmethods_apigateway_packages_publish_groups_ignore_errors }}"
vars:
configs_action: publish-packages-groups
configs_enabled: "{{ vars_webmethods_apigateway_packages_publish_groups_enabled }}"
rvar_apigateway_packages_publish_groups: "{{ vars_webmethods_apigateway_packages_publish_groups }}"
tags:
- publish_apis