forked from brianehlert/ansible-nginx-controller-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx_controller_component.yaml
54 lines (50 loc) · 1.8 KB
/
nginx_controller_component.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
# ansible-playbook nginx_controller_component.yaml -e "[email protected] nginx_controller_user_password=notsecure nginx_controller_fqdn=controller.example.local"
# ansible-playbook nginx_controller_component.yaml -e "@nginx_controller_component_vars.yaml"
- hosts: localhost
gather_facts: no
collections:
- nginxinc.nginx_controller
tasks:
- include_role:
name: nginx_controller_generate_token
- name: configure the component
include_role:
name: nginx_controller_component
vars:
nginx_controller_appName: "lending.acmefinancial.net"
nginx_controller_environmentName: "production-us-west"
nginx_controller_component:
metadata:
name: core-lending
displayName: "Shared Public Lending BU Gateway"
description: "Routes all non special Lending applications"
desiredState:
ingress:
uris:
"/":
{} # use defaults
"/jokes/random":
matchMethod: PREFIX
gatewayRefs:
- ref: "/services/environments/production-us-west/gateways/lending"
backend:
workloadGroups:
group1:
uris:
"http://10.1.10.11:8121":
isDown: true
"http://10.1.10.12:8121":
{} # use defaults
"http://10.1.10.11:5821":
{} # use defaults
"http://10.1.10.12:5821":
failTimeout: 10s
loadBalancingMethod:
type: ROUND_ROBIN
monitoring:
response:
status:
range:
startCode: 200
endCode: 201
match: true